home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-15 | 42.0 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Sat Apr 15 00:19:42 1995, modified Sat Apr 15 00:19:42 1995, creator 'MMCC', type ASCII, 42324 bytes "VideoToolbox.h" , at 0xa5d4 456 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 56 69 64 65 6f 54 | 6f 6f 6c 62 6f 78 2e 68 |..VideoT|oolbox.h|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 a5 54 00 | 00 01 c8 ab b4 f9 de ab |......T.|........|
|00000060| b4 f9 de 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 11 56 00 00 |........|.....V..|
|00000080| 2f 2a 0d 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |/*.Video|Toolbox.|
|00000090| 68 0d 54 68 69 73 20 66 | 69 6c 65 20 63 6f 6e 74 |h.This f|ile cont|
|000000a0| 61 69 6e 73 20 74 68 65 | 20 6e 65 63 65 73 73 61 |ains the| necessa|
|000000b0| 72 79 20 70 72 6f 74 6f | 74 79 70 65 73 20 66 6f |ry proto|types fo|
|000000c0| 72 20 75 73 65 20 6f 66 | 20 61 6c 6c 20 74 68 65 |r use of| all the|
|000000d0| 20 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 0d 66 69 | VideoTo|olbox.fi|
|000000e0| 6c 65 73 20 65 78 63 65 | 70 74 20 4c 75 6d 69 6e |les exce|pt Lumin|
|000000f0| 61 6e 63 65 2e 63 2c 20 | 77 68 69 63 68 20 68 61 |ance.c, |which ha|
|00000100| 73 20 69 74 73 20 6f 77 | 6e 20 68 65 61 64 65 72 |s its ow|n header|
|00000110| 20 66 69 6c 65 2c 20 4c | 75 6d 69 6e 61 6e 63 65 | file, L|uminance|
|00000120| 2e 68 2c 20 61 6e 64 0d | 47 44 49 6e 66 6f 2e 63 |.h, and.|GDInfo.c|
|00000130| 20 61 6e 64 20 47 44 54 | 65 73 74 43 6c 75 74 2e | and GDT|estClut.|
|00000140| 63 2c 20 77 68 69 63 68 | 20 75 73 65 20 47 44 49 |c, which| use GDI|
|00000150| 6e 66 6f 2e 68 2e 0d 0d | 50 72 65 63 6f 6d 70 69 |nfo.h...|Precompi|
|00000160| 6c 61 74 69 6f 6e 20 6f | 66 20 74 68 69 73 20 68 |lation o|f this h|
|00000170| 65 61 64 65 72 2c 20 70 | 72 6f 64 75 63 69 6e 67 |eader, p|roducing|
|00000180| 20 65 69 74 68 65 72 20 | 56 69 64 65 6f 54 6f 6f | either |VideoToo|
|00000190| 6c 62 6f 78 2e 70 72 65 | 20 6f 72 0d 56 69 64 65 |lbox.pre| or.Vide|
|000001a0| 6f 54 6f 6f 6c 62 6f 78 | 4d 41 54 4c 41 42 2e 70 |oToolbox|MATLAB.p|
|000001b0| 72 65 2c 20 77 69 6c 6c | 20 72 65 64 75 63 65 20 |re, will| reduce |
|000001c0| 79 6f 75 72 20 63 6f 6d | 70 69 6c 61 74 69 6f 6e |your com|pilation|
|000001d0| 20 74 69 6d 65 20 74 65 | 6e 66 6f 6c 64 2e 20 53 | time te|nfold. S|
|000001e0| 65 65 0d 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |ee.Video|Toolbox.|
|000001f0| 63 20 6f 72 20 56 69 64 | 65 6f 54 6f 6f 6c 62 6f |c or Vid|eoToolbo|
|00000200| 78 4d 41 54 4c 41 42 2e | 63 20 66 6f 72 20 69 6e |xMATLAB.|c for in|
|00000210| 73 74 72 75 63 74 69 6f | 6e 73 2e 0d 0d 48 65 61 |structio|ns...Hea|
|00000220| 64 65 72 20 66 69 6c 65 | 73 20 77 68 6f 73 65 20 |der file|s whose |
|00000230| 70 72 65 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 20 64 |precompi|lation d|
|00000240| 65 70 65 6e 64 73 20 6f | 6e 20 74 68 65 20 6d 63 |epends o|n the mc|
|00000250| 36 38 38 38 31 20 6f 72 | 20 6d 63 36 38 30 32 30 |68881 or| mc68020|
|00000260| 20 54 48 49 4e 4b 20 43 | 0d 63 6f 6d 70 69 6c 65 | THINK C|.compile|
|00000270| 72 20 6f 70 74 69 6f 6e | 73 20 28 69 2e 65 2e 20 |r option|s (i.e. |
|00000280| 6d 61 74 68 2e 68 20 61 | 6e 64 20 6d 63 36 38 38 |math.h a|nd mc688|
|00000290| 38 31 2e 68 29 20 77 65 | 72 65 20 6f 6d 69 74 74 |81.h) we|re omitt|
|000002a0| 65 64 20 66 72 6f 6d 20 | 56 69 64 65 6f 54 6f 6f |ed from |VideoToo|
|000002b0| 6c 62 6f 78 2e 68 20 73 | 6f 0d 74 68 61 74 20 74 |lbox.h s|o.that t|
|000002c0| 68 65 20 72 65 73 75 6c | 74 69 6e 67 20 70 72 65 |he resul|ting pre|
|000002d0| 63 6f 6d 70 69 6c 65 64 | 20 68 65 61 64 65 72 20 |compiled| header |
|000002e0| 66 69 6c 65 20 63 61 6e | 20 62 65 20 75 73 65 64 |file can| be used|
|000002f0| 20 69 6e 20 70 72 6f 6a | 65 63 74 73 20 72 65 67 | in proj|ects reg|
|00000300| 61 72 64 6c 65 73 73 20 | 6f 66 0d 74 68 6f 73 65 |ardless |of.those|
|00000310| 20 6f 70 74 69 6f 6e 73 | 2e 20 28 59 6f 75 d5 6c | options|. (You.l|
|00000320| 6c 20 77 61 6e 74 20 74 | 68 65 6d 20 65 6e 61 62 |l want t|hem enab|
|00000330| 6c 65 64 20 66 6f 72 20 | 73 70 65 65 64 20 69 6e |led for |speed in|
|00000340| 20 79 6f 75 72 20 6c 61 | 62 2c 20 62 75 74 20 79 | your la|b, but y|
|00000350| 6f 75 d5 6c 6c 0d 75 73 | 75 61 6c 6c 79 20 77 61 |ou.ll.us|ually wa|
|00000360| 6e 74 20 74 68 65 6d 20 | 64 69 73 61 62 6c 65 64 |nt them |disabled|
|00000370| 20 66 6f 72 20 70 6f 72 | 74 61 62 69 6c 69 74 79 | for por|tability|
|00000380| 20 6f 6e 20 74 68 65 20 | 72 6f 61 64 2c 20 65 2e | on the |road, e.|
|00000390| 67 2e 20 74 68 65 20 50 | 6f 77 65 72 42 6f 6f 6b |g. the P|owerBook|
|000003a0| 20 31 36 30 0d 68 61 73 | 20 6e 6f 20 66 6c 6f 61 | 160.has| no floa|
|000003b0| 74 69 6e 67 20 70 6f 69 | 6e 74 20 75 6e 69 74 2e |ting poi|nt unit.|
|000003c0| 29 20 49 66 20 79 6f 75 | 20 63 68 61 6e 67 65 20 |) If you| change |
|000003d0| 6f 74 68 65 72 20 6f 70 | 74 69 6f 6e 73 20 74 68 |other op|tions th|
|000003e0| 61 74 20 61 66 66 65 63 | 74 20 74 68 65 0d 70 72 |at affec|t the.pr|
|000003f0| 65 2d 63 6f 6d 70 69 6c | 61 74 69 6f 6e 20 6f 66 |e-compil|ation of|
|00000400| 20 74 68 65 20 68 65 61 | 64 65 72 73 20 28 65 2e | the hea|ders (e.|
|00000410| 67 2e 20 73 69 7a 65 20 | 6f 66 20 64 6f 75 62 6c |g. size |of doubl|
|00000420| 65 20 6f 72 20 73 69 7a | 65 20 6f 66 20 69 6e 74 |e or siz|e of int|
|00000430| 29 20 79 6f 75 20 73 68 | 6f 75 6c 64 0d 72 65 62 |) you sh|ould.reb|
|00000440| 75 69 6c 64 20 74 68 65 | 20 70 72 65 63 6f 6d 70 |uild the| precomp|
|00000450| 69 6c 65 64 20 68 65 61 | 64 65 72 20 66 69 6c 65 |iled hea|der file|
|00000460| 2c 20 74 6f 20 72 65 66 | 6c 65 63 74 20 74 68 65 |, to ref|lect the|
|00000470| 20 6e 65 77 20 73 65 74 | 74 69 6e 67 73 2e 0d 0d | new set|tings...|
|00000480| 54 68 65 20 70 72 65 63 | 6f 6d 70 69 6c 61 74 69 |The prec|ompilati|
|00000490| 6f 6e 20 5f 64 6f 65 73 | 5f 20 64 65 70 65 6e 64 |on _does|_ depend|
|000004a0| 20 6f 6e 20 74 68 65 20 | 73 69 7a 65 6f 66 28 64 | on the |sizeof(d|
|000004b0| 6f 75 62 6c 65 29 20 61 | 6e 64 20 73 69 7a 65 6f |ouble) a|nd sizeo|
|000004c0| 66 28 69 6e 74 29 0d 62 | 65 63 61 75 73 65 20 6d |f(int).b|ecause m|
|000004d0| 6f 73 74 20 66 75 6e 63 | 74 69 6f 6e 73 20 75 73 |ost func|tions us|
|000004e0| 65 20 6f 72 20 72 65 74 | 75 72 6e 20 73 75 63 68 |e or ret|urn such|
|000004f0| 20 76 61 6c 75 65 73 20 | 61 6e 64 20 74 68 65 20 | values |and the |
|00000500| 65 78 74 65 72 6e 61 6c | 20 69 6e 74 65 72 66 61 |external| interfa|
|00000510| 63 65 20 6d 75 73 74 0d | 61 6c 6c 6f 77 20 74 68 |ce must.|allow th|
|00000520| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 61 6d |e approp|riate am|
|00000530| 6f 75 6e 74 20 6f 66 20 | 73 70 61 63 65 2e 20 54 |ount of |space. T|
|00000540| 48 49 4e 4b 20 43 20 73 | 75 70 70 6f 72 74 73 20 |HINK C s|upports |
|00000550| 61 20 31 32 2d 62 79 74 | 65 20 22 75 6e 69 76 65 |a 12-byt|e "unive|
|00000560| 72 73 61 6c 22 0d 66 6f | 72 6d 61 74 20 64 6f 75 |rsal".fo|rmat dou|
|00000570| 62 6c 65 20 74 68 61 74 | 20 77 6f 72 6b 73 20 77 |ble that| works w|
|00000580| 65 6c 6c 20 62 6f 74 68 | 20 77 69 74 68 20 74 68 |ell both| with th|
|00000590| 65 20 36 38 38 38 31 20 | 66 70 75 20 28 77 68 69 |e 68881 |fpu (whi|
|000005a0| 63 68 20 75 73 65 73 20 | 74 68 65 20 74 6f 70 20 |ch uses |the top |
|000005b0| 74 77 6f 0d 62 79 74 65 | 73 20 61 6e 64 20 74 68 |two.byte|s and th|
|000005c0| 65 20 62 6f 74 74 6f 6d | 20 38 20 62 79 74 65 73 |e bottom| 8 bytes|
|000005d0| 29 20 61 6e 64 20 77 69 | 74 68 20 53 41 4e 45 20 |) and wi|th SANE |
|000005e0| 28 77 68 69 63 68 20 75 | 73 65 73 20 74 68 65 20 |(which u|ses the |
|000005f0| 62 6f 74 74 6f 6d 20 31 | 30 20 62 79 74 65 73 29 |bottom 1|0 bytes)|
|00000600| 2e 0d 54 68 75 73 20 69 | 6e 20 54 48 49 4e 4b 20 |..Thus i|n THINK |
|00000610| 43 20 69 74 20 69 73 20 | 65 61 73 79 20 74 6f 20 |C it is |easy to |
|00000620| 6d 69 78 20 6d 6f 64 75 | 6c 65 73 20 63 6f 6d 70 |mix modu|les comp|
|00000630| 69 6c 65 64 20 77 69 74 | 68 20 28 65 2e 67 2e 20 |iled wit|h (e.g. |
|00000640| 79 6f 75 72 20 63 6f 64 | 65 29 20 61 6e 64 0d 77 |your cod|e) and.w|
|00000650| 69 74 68 6f 75 74 20 28 | 65 2e 67 2e 20 74 68 65 |ithout (|e.g. the|
|00000660| 20 41 4e 53 49 20 6c 69 | 62 72 61 72 79 29 20 74 | ANSI li|brary) t|
|00000670| 68 65 20 36 38 38 38 31 | 20 6f 70 74 69 6f 6e 2e |he 68881| option.|
|00000680| 20 55 6e 66 6f 72 74 75 | 6e 61 74 65 6c 79 20 74 | Unfortu|nately t|
|00000690| 68 61 74 20 65 78 63 65 | 6c 6c 65 6e 74 0d 66 65 |hat exce|llent.fe|
|000006a0| 61 74 75 72 65 20 69 73 | 20 75 6e 69 71 75 65 20 |ature is| unique |
|000006b0| 74 6f 20 54 48 49 4e 4b | 20 43 2e 20 49 6e 20 4d |to THINK| C. In M|
|000006c0| 50 57 20 61 6e 64 20 43 | 6f 64 65 57 61 72 72 69 |PW and C|odeWarri|
|000006d0| 6f 72 20 43 20 79 6f 75 | 20 6d 75 73 74 20 75 73 |or C you| must us|
|000006e0| 65 20 31 30 2d 62 79 74 | 65 0d 64 6f 75 62 6c 65 |e 10-byt|e.double|
|000006f0| 73 20 77 68 65 6e 20 79 | 6f 75 20 75 73 65 20 53 |s when y|ou use S|
|00000700| 41 4e 45 20 28 69 2e 65 | 2e 20 64 6f 6e 27 74 20 |ANE (i.e|. don't |
|00000710| 75 73 65 20 74 68 65 20 | 36 38 38 38 31 20 66 70 |use the |68881 fp|
|00000720| 75 29 2c 20 73 6f 20 77 | 68 65 6e 20 79 6f 75 20 |u), so w|hen you |
|00000730| 75 73 65 20 74 68 65 73 | 65 0d 63 6f 6d 70 69 6c |use thes|e.compil|
|00000740| 65 72 73 20 79 6f 75 27 | 6c 6c 20 6e 65 65 64 20 |ers you'|ll need |
|00000750| 73 65 70 61 72 61 74 65 | 20 70 72 65 2d 63 6f 6d |separate| pre-com|
|00000760| 70 69 6c 65 64 20 68 65 | 61 64 65 72 73 2c 20 77 |piled he|aders, w|
|00000770| 69 74 68 20 61 6e 64 20 | 77 69 74 68 6f 75 74 20 |ith and |without |
|00000780| 74 68 65 20 36 38 38 38 | 31 0d 6f 70 74 69 6f 6e |the 6888|1.option|
|00000790| 2c 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |, if you| want to|
|000007a0| 20 63 6f 6d 70 69 6c 65 | 20 66 6f 72 20 65 61 63 | compile| for eac|
|000007b0| 68 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 3a 20 74 |h enviro|nment: t|
|000007c0| 6f 20 75 73 65 20 74 68 | 65 20 36 38 38 38 31 20 |o use th|e 68881 |
|000007d0| 66 70 75 2c 20 6f 72 0d | 72 75 6e 20 6f 6e 20 6d |fpu, or.|run on m|
|000007e0| 61 63 68 69 6e 65 73 20 | 74 68 61 74 20 6c 61 63 |achines |that lac|
|000007f0| 6b 20 69 74 2e 0d 0d 4d | 65 74 72 6f 77 65 72 6b |k it...M|etrowerk|
|00000800| 73 20 43 6f 64 65 57 61 | 72 72 69 6f 72 20 70 72 |s CodeWa|rrior pr|
|00000810| 6f 6a 65 63 74 20 6e 61 | 6d 65 73 20 65 6e 64 20 |oject na|mes end |
|00000820| 69 6e 20 22 b5 22 2c 20 | 61 6e 64 20 69 6e 64 69 |in ".", |and indi|
|00000830| 63 61 74 65 20 77 68 69 | 63 68 20 63 70 75 20 74 |cate whi|ch cpu t|
|00000840| 68 65 79 0d 73 75 70 70 | 6f 72 74 20 62 79 20 22 |hey.supp|ort by "|
|00000850| 36 38 6b 22 20 6f 72 20 | 22 70 70 63 22 2e 20 54 |68k" or |"ppc". T|
|00000860| 48 49 4e 4b 20 43 20 70 | 72 6f 6a 65 63 74 73 20 |HINK C p|rojects |
|00000870| 73 75 70 70 6f 72 74 20 | 6f 6e 6c 79 20 74 68 65 |support |only the|
|00000880| 20 36 38 6b 20 61 6e 64 | 20 68 61 76 65 20 6e 61 | 68k and| have na|
|00000890| 6d 65 73 0d 65 6e 64 69 | 6e 67 20 69 6e 20 22 b9 |mes.endi|ng in ".|
|000008a0| 22 2e 0d 0d 4d 79 20 6e | 61 6d 69 6e 67 20 63 6f |"...My n|aming co|
|000008b0| 6e 76 65 6e 74 69 6f 6e | 20 66 6f 72 20 70 72 65 |nvention| for pre|
|000008c0| 2d 63 6f 6d 70 69 6c 65 | 64 20 68 65 61 64 65 72 |-compile|d header|
|000008d0| 73 20 69 6e 64 69 63 61 | 74 65 73 20 74 68 65 20 |s indica|tes the |
|000008e0| 73 69 7a 65 20 6f 66 20 | 69 6e 74 2c 20 22 32 69 |size of |int, "2i|
|000008f0| 22 20 6f 72 0d 22 34 69 | 22 2c 20 61 6e 64 2c 20 |" or."4i|", and, |
|00000900| 69 66 20 74 68 65 20 36 | 38 38 38 31 20 69 73 20 |if the 6|8881 is |
|00000910| 72 65 71 75 69 72 65 64 | 2c 20 22 38 38 31 22 2e |required|, "881".|
|00000920| 20 4d 65 74 72 6f 77 65 | 72 6b 73 20 70 72 65 2d | Metrowe|rks pre-|
|00000930| 63 6f 6d 70 69 6c 65 64 | 20 68 65 61 64 65 72 73 |compiled| headers|
|00000940| 0d 69 6e 64 69 63 61 74 | 65 20 77 68 69 63 68 20 |.indicat|e which |
|00000950| 63 70 75 20 74 68 65 79 | 20 73 75 70 70 6f 72 74 |cpu they| support|
|00000960| 20 62 79 20 22 36 38 6b | 22 20 6f 72 20 22 70 70 | by "68k|" or "pp|
|00000970| 63 22 3b 20 54 48 49 4e | 4b 20 43 20 73 75 70 70 |c"; THIN|K C supp|
|00000980| 6f 72 74 73 20 6f 6e 6c | 79 20 74 68 65 0d 36 38 |orts onl|y the.68|
|00000990| 6b 2e 20 54 68 65 20 54 | 48 49 4e 4b 20 43 20 70 |k. The T|HINK C p|
|000009a0| 72 65 2d 63 6f 6d 70 69 | 6c 65 64 20 68 65 61 64 |re-compi|led head|
|000009b0| 65 72 20 74 68 61 74 20 | 49 20 75 73 65 20 69 73 |er that |I use is|
|000009c0| 20 22 56 69 64 65 6f 54 | 6f 6f 6c 62 6f 78 2e 70 | "VideoT|oolbox.p|
|000009d0| 72 65 22 2c 20 77 68 69 | 63 68 0d 75 73 65 73 20 |re", whi|ch.uses |
|000009e0| 32 2d 62 79 74 65 20 69 | 6e 74 73 20 61 6e 64 20 |2-byte i|nts and |
|000009f0| 22 75 6e 69 76 65 72 73 | 61 6c 22 20 31 32 2d 62 |"univers|al" 12-b|
|00000a00| 79 74 65 20 64 6f 75 62 | 6c 65 73 20 74 68 61 74 |yte doub|les that|
|00000a10| 20 77 6f 72 6b 20 77 69 | 74 68 20 6f 72 20 77 69 | work wi|th or wi|
|00000a20| 74 68 6f 75 74 20 74 68 | 65 0d 36 38 38 38 31 2e |thout th|e.68881.|
|00000a30| 20 28 54 68 65 20 54 48 | 49 4e 4b 20 43 20 41 4e | (The TH|INK C AN|
|00000a40| 53 49 20 6c 69 62 72 61 | 72 79 20 72 65 71 75 69 |SI libra|ry requi|
|00000a50| 72 65 73 20 32 2d 62 79 | 74 65 20 69 6e 74 73 2e |res 2-by|te ints.|
|00000a60| 29 20 54 68 65 20 4d 65 | 74 72 6f 77 65 72 6b 73 |) The Me|trowerks|
|00000a70| 0d 43 6f 64 65 57 61 72 | 72 69 6f 72 20 43 20 70 |.CodeWar|rior C p|
|00000a80| 72 65 2d 63 6f 6d 70 69 | 6c 65 64 20 68 65 61 64 |re-compi|led head|
|00000a90| 65 72 73 20 74 68 61 74 | 20 49 20 75 73 65 20 61 |ers that| I use a|
|00000aa0| 72 65 20 63 61 6c 6c 65 | 64 2c 0d 22 56 69 64 65 |re calle|d,."Vide|
|00000ab0| 6f 54 6f 6f 6c 62 6f 78 | 2e 36 38 6b 2e 34 69 2e |oToolbox|.68k.4i.|
|00000ac0| 70 72 65 22 2c 20 22 56 | 69 64 65 6f 54 6f 6f 6c |pre", "V|ideoTool|
|00000ad0| 62 6f 78 2e 36 38 6b 2e | 34 69 2e 38 38 31 2e 70 |box.68k.|4i.881.p|
|00000ae0| 72 65 22 2c 20 61 6e 64 | 0d 22 56 69 64 65 6f 54 |re", and|."VideoT|
|00000af0| 6f 6f 6c 62 6f 78 2e 70 | 70 63 2e 70 72 65 22 2e |oolbox.p|pc.pre".|
|00000b00| 0d 0d 4d 41 43 5f 43 3a | 0d 0d 54 68 65 20 41 70 |..MAC_C:|..The Ap|
|00000b10| 70 6c 65 20 4d 61 63 69 | 6e 74 6f 73 68 20 68 65 |ple Maci|ntosh he|
|00000b20| 61 64 65 72 20 66 69 6c | 65 73 20 75 73 65 20 73 |ader fil|es use s|
|00000b30| 6f 6d 65 20 65 78 74 65 | 6e 73 69 6f 6e 73 20 74 |ome exte|nsions t|
|00000b40| 6f 20 43 20 74 68 61 74 | 20 61 72 65 20 6e 6f 74 |o C that| are not|
|00000b50| 20 70 61 72 74 20 6f 66 | 0d 53 74 61 6e 64 61 72 | part of|.Standar|
|00000b60| 64 20 43 2c 20 65 2e 67 | 2e 20 22 70 61 73 63 61 |d C, e.g|. "pasca|
|00000b70| 6c 22 2c 20 22 73 68 6f | 72 74 20 64 6f 75 62 6c |l", "sho|rt doubl|
|00000b80| 65 22 2c 20 65 6e 75 6d | 73 20 6c 61 72 67 65 72 |e", enum|s larger|
|00000b90| 20 74 68 61 6e 20 69 6e | 74 73 2c 20 61 6e 64 20 | than in|ts, and |
|00000ba0| 66 75 6e 63 74 69 6f 6e | 0d 70 72 6f 74 6f 74 79 |function|.prototy|
|00000bb0| 70 65 73 20 74 68 61 74 | 20 73 70 65 63 69 66 79 |pes that| specify|
|00000bc0| 20 61 62 73 6f 6c 75 74 | 65 20 61 64 64 72 65 73 | absolut|e addres|
|00000bd0| 73 65 73 2e 20 54 68 65 | 73 65 20 6b 65 79 77 6f |ses. The|se keywo|
|00000be0| 72 64 73 20 61 6e 64 20 | 63 6f 6e 73 74 72 75 63 |rds and |construc|
|00000bf0| 74 69 6f 6e 73 0d 63 61 | 6e 6e 6f 74 20 62 65 20 |tions.ca|nnot be |
|00000c00| 63 6f 6d 70 69 6c 65 64 | 20 69 6e 20 53 74 61 6e |compiled| in Stan|
|00000c10| 64 61 72 64 20 43 2e 20 | 54 68 65 20 6d 61 63 72 |dard C. |The macr|
|00000c20| 6f 20 4d 41 43 5f 43 20 | 69 73 20 64 65 66 69 6e |o MAC_C |is defin|
|00000c30| 65 64 20 61 73 20 74 72 | 75 65 2c 20 62 65 6c 6f |ed as tr|ue, belo|
|00000c40| 77 2c 0d 6f 6e 6c 79 20 | 6f 6e 20 4d 61 63 69 6e |w,.only |on Macin|
|00000c50| 74 6f 73 68 20 43 20 63 | 6f 6d 70 69 6c 65 72 73 |tosh C c|ompilers|
|00000c60| 20 74 68 61 74 20 69 6e | 63 6f 72 70 6f 72 61 74 | that in|corporat|
|00000c70| 65 20 74 68 65 73 65 20 | 65 78 74 65 6e 73 69 6f |e these |extensio|
|00000c80| 6e 73 2c 20 61 6e 64 20 | 69 73 20 66 61 6c 73 65 |ns, and |is false|
|00000c90| 0d 6f 74 68 65 72 77 69 | 73 65 2e 20 54 68 65 20 |.otherwi|se. The |
|00000ca0| 4d 41 43 5f 43 20 73 79 | 6d 62 6f 6c 20 69 73 20 |MAC_C sy|mbol is |
|00000cb0| 75 73 65 64 20 74 6f 20 | 70 72 65 76 65 6e 74 20 |used to |prevent |
|00000cc0| 69 6e 63 6c 75 73 69 6f | 6e 20 6f 66 20 61 6c 6c |inclusio|n of all|
|00000cd0| 20 74 68 65 0d 4d 61 63 | 69 6e 74 6f 73 68 2d 64 | the.Mac|intosh-d|
|00000ce0| 65 70 65 6e 64 65 6e 74 | 20 68 65 61 64 65 72 20 |ependent| header |
|00000cf0| 66 69 6c 65 73 20 61 6e | 64 20 70 72 6f 74 6f 74 |files an|d protot|
|00000d00| 79 70 65 73 20 77 68 65 | 6e 20 74 68 65 20 63 6f |ypes whe|n the co|
|00000d10| 6d 70 69 6c 65 72 20 64 | 6f 65 73 6e 27 74 0d 73 |mpiler d|oesn't.s|
|00000d20| 75 70 70 6f 72 74 20 74 | 68 65 6d 2e 20 48 6f 77 |upport t|hem. How|
|00000d30| 65 76 65 72 2c 20 6c 61 | 63 6b 69 6e 67 20 61 6e |ever, la|cking an|
|00000d40| 79 20 67 65 6e 65 72 61 | 6c 20 74 65 73 74 20 66 |y genera|l test f|
|00000d50| 6f 72 20 74 68 65 73 65 | 20 65 78 74 65 6e 73 69 |or these| extensi|
|00000d60| 6f 6e 73 2c 20 61 20 74 | 65 73 74 0d 6d 75 73 74 |ons, a t|est.must|
|00000d70| 20 62 65 20 61 64 64 65 | 64 2c 20 62 65 6c 6f 77 | be adde|d, below|
|00000d80| 2c 20 66 6f 72 20 65 61 | 63 68 20 6e 65 77 20 63 |, for ea|ch new c|
|00000d90| 6f 6d 70 69 6c 65 72 2e | 20 41 74 20 70 72 65 73 |ompiler.| At pres|
|00000da0| 65 6e 74 20 77 65 20 74 | 65 73 74 20 66 6f 72 20 |ent we t|est for |
|00000db0| 53 79 6d 61 6e 74 65 63 | 27 73 0d 54 48 49 4e 4b |Symantec|'s.THINK|
|00000dc0| 20 43 2c 20 41 70 70 6c | 65 27 73 20 4d 50 57 20 | C, Appl|e's MPW |
|00000dd0| 43 2c 20 61 6e 64 20 4d | 65 74 72 6f 77 65 72 6b |C, and M|etrowerk|
|00000de0| 73 20 43 6f 64 65 57 61 | 72 72 69 6f 72 20 43 2e |s CodeWa|rrior C.|
|00000df0| 0d 0d 4d 41 54 4c 41 42 | 3a 0d 0d 54 68 65 20 56 |..MATLAB|:..The V|
|00000e00| 69 64 65 6f 54 6f 6f 6c | 62 6f 78 20 73 6f 75 72 |ideoTool|box sour|
|00000e10| 63 65 73 20 63 61 6e 20 | 62 65 20 6c 69 6e 6b 65 |ces can |be linke|
|00000e20| 64 20 74 6f 20 63 72 65 | 61 74 65 20 61 20 73 74 |d to cre|ate a st|
|00000e30| 61 6e 64 2d 61 6c 6f 6e | 65 20 43 20 61 70 70 6c |and-alon|e C appl|
|00000e40| 69 63 61 74 69 6f 6e 2c | 20 6f 72 0d 61 20 4d 41 |ication,| or.a MA|
|00000e50| 54 4c 41 42 20 65 78 74 | 65 72 6e 61 6c 20 63 6f |TLAB ext|ernal co|
|00000e60| 64 65 20 72 65 73 6f 75 | 72 63 65 20 28 61 20 22 |de resou|rce (a "|
|00000e70| 4d 45 58 22 20 66 69 6c | 65 29 2c 20 74 6f 20 62 |MEX" fil|e), to b|
|00000e80| 65 20 69 6e 76 6f 6b 65 | 64 20 62 79 20 74 79 70 |e invoke|d by typ|
|00000e90| 69 6e 67 20 74 68 65 0d | 66 75 6e 63 74 69 6f 6e |ing the.|function|
|00000ea0| 20 6e 61 6d 65 20 66 72 | 6f 6d 20 77 69 74 68 69 | name fr|om withi|
|00000eb0| 6e 20 4d 41 54 4c 41 42 | 2e 20 49 6e 20 74 68 61 |n MATLAB|. In tha|
|00000ec0| 74 20 63 61 73 65 20 77 | 65 20 63 61 6c 6c 20 74 |t case w|e call t|
|00000ed0| 68 65 20 54 48 49 4e 4b | 20 43 20 70 72 6f 6a 65 |he THINK| C proje|
|00000ee0| 63 74 20 61 0d 22 4d 41 | 54 4c 41 42 20 70 72 6f |ct a."MA|TLAB pro|
|00000ef0| 6a 65 63 74 22 2e 20 41 | 20 4d 41 54 4c 41 42 20 |ject". A| MATLAB |
|00000f00| 70 72 6f 6a 65 63 74 20 | 6d 75 73 74 20 23 64 65 |project |must #de|
|00000f10| 66 69 6e 65 20 74 68 65 | 20 73 79 6d 62 6f 6c 20 |fine the| symbol |
|00000f20| 4d 41 54 4c 41 42 20 61 | 73 20 74 72 75 65 20 66 |MATLAB a|s true f|
|00000f30| 6f 72 0d 65 76 65 72 79 | 20 43 20 66 69 6c 65 2c |or.every| C file,|
|00000f40| 20 6d 75 73 74 20 23 69 | 6e 63 6c 75 64 65 20 74 | must #i|nclude t|
|00000f50| 68 65 20 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |he Video|Toolbox.|
|00000f60| 68 20 68 65 61 64 65 72 | 20 61 74 20 74 68 65 20 |h header| at the |
|00000f70| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 65 76 65 |beginnin|g of eve|
|00000f80| 72 79 0d 43 20 66 69 6c | 65 2c 20 61 6e 64 20 6d |ry.C fil|e, and m|
|00000f90| 75 73 74 20 23 69 6e 63 | 6c 75 64 65 20 4d 41 54 |ust #inc|lude MAT|
|00000fa0| 4c 41 42 4d 61 69 6e 2e | 68 20 69 6e 20 74 68 65 |LABMain.|h in the|
|00000fb0| 20 6d 61 69 6e 20 43 20 | 66 69 6c 65 2e 0d 0d 44 | main C |file...D|
|00000fc0| 6f 6e 27 74 20 23 64 65 | 66 69 6e 65 20 4d 41 54 |on't #de|fine MAT|
|00000fd0| 4c 41 42 20 77 69 74 68 | 69 6e 20 79 6f 75 72 20 |LAB with|in your |
|00000fe0| 43 20 66 69 6c 65 3b 20 | 75 73 65 20 74 68 65 20 |C file; |use the |
|00000ff0| 45 64 69 74 3a 4f 70 74 | 69 6f 6e 73 3a 54 48 49 |Edit:Opt|ions:THI|
|00001000| 4e 4b 20 43 3a 50 72 65 | 66 69 78 0d 77 69 6e 64 |NK C:Pre|fix.wind|
|00001010| 6f 77 20 69 6e 73 74 65 | 61 64 2e 20 45 2e 67 2e |ow inste|ad. E.g.|
|00001020| 20 79 6f 75 20 63 6f 75 | 6c 64 20 74 79 70 65 0d | you cou|ld type.|
|00001030| 09 23 64 65 66 69 6e 65 | 20 4d 41 54 4c 41 42 20 |.#define| MATLAB |
|00001040| 31 0d 69 6e 74 6f 20 74 | 68 65 20 50 72 65 66 69 |1.into t|he Prefi|
|00001050| 78 20 77 69 6e 64 6f 77 | 2c 20 6f 72 2c 20 6d 6f |x window|, or, mo|
|00001060| 72 65 20 63 6f 6e 76 65 | 6e 69 65 6e 74 6c 79 20 |re conve|niently |
|00001070| 28 62 65 63 61 75 73 65 | 20 69 74 20 73 70 65 65 |(because| it spee|
|00001080| 64 73 20 75 70 20 79 6f | 75 72 0d 63 6f 6d 70 69 |ds up yo|ur.compi|
|00001090| 6c 61 74 69 6f 6e 73 20 | 65 6e 6f 72 6d 6f 75 73 |lations |enormous|
|000010a0| 6c 79 29 2c 20 74 79 70 | 65 0d 09 23 69 6e 63 6c |ly), typ|e..#incl|
|000010b0| 75 64 65 20 22 56 69 64 | 65 6f 54 6f 6f 6c 62 6f |ude "Vid|eoToolbo|
|000010c0| 78 4d 41 54 4c 41 42 2e | 70 72 65 22 0d 53 65 65 |xMATLAB.|pre".See|
|000010d0| 20 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 4d 41 54 | VideoTo|olboxMAT|
|000010e0| 4c 41 42 2e 63 20 66 6f | 72 20 69 6e 73 74 72 75 |LAB.c fo|r instru|
|000010f0| 63 74 69 6f 6e 73 2e 0d | 0d 54 68 65 20 4d 41 54 |ctions..|.The MAT|
|00001100| 4c 41 42 4d 61 69 6e 2e | 68 20 68 65 61 64 65 72 |LABMain.|h header|
|00001110| 20 61 6c 6c 6f 63 61 74 | 65 73 20 73 70 61 63 65 | allocat|es space|
|00001120| 20 66 6f 72 20 51 75 69 | 63 6b 44 72 61 77 20 67 | for Qui|ckDraw g|
|00001130| 6c 6f 62 61 6c 73 20 66 | 6f 72 20 75 73 65 20 62 |lobals f|or use b|
|00001140| 79 20 54 48 49 4e 4b 20 | 43 0d 4d 41 54 4c 41 42 |y THINK |C.MATLAB|
|00001150| 20 70 72 6f 6a 65 63 74 | 73 2e 20 49 74 20 73 68 | project|s. It sh|
|00001160| 6f 75 6c 64 20 62 65 20 | 23 69 6e 63 6c 75 64 65 |ould be |#include|
|00001170| 64 20 69 6e 20 74 68 65 | 20 6d 61 69 6e 20 43 20 |d in the| main C |
|00001180| 66 69 6c 65 20 6f 66 20 | 65 61 63 68 20 54 48 49 |file of |each THI|
|00001190| 4e 4b 20 43 0d 4d 41 54 | 4c 41 42 20 70 72 6f 6a |NK C.MAT|LAB proj|
|000011a0| 65 63 74 2c 20 69 2e 65 | 2e 20 69 6e 20 74 68 65 |ect, i.e|. in the|
|000011b0| 20 43 20 66 69 6c 65 20 | 74 68 61 74 20 63 6f 6e | C file |that con|
|000011c0| 74 61 69 6e 73 20 22 6d | 61 69 6e 22 20 6f 72 20 |tains "m|ain" or |
|000011d0| 22 75 73 65 72 5f 66 63 | 6e 22 2e 20 49 74 20 6d |"user_fc|n". It m|
|000011e0| 75 73 74 0d 62 65 20 69 | 6e 63 6c 75 64 65 64 20 |ust.be i|ncluded |
|000011f0| 69 6e 20 65 78 61 63 74 | 6c 79 20 6f 6e 65 20 73 |in exact|ly one s|
|00001200| 6f 75 72 63 65 20 66 69 | 6c 65 20 6f 66 20 65 61 |ource fi|le of ea|
|00001210| 63 68 20 70 72 6f 6a 65 | 63 74 2c 20 61 73 20 74 |ch proje|ct, as t|
|00001220| 68 65 20 54 48 49 4e 4b | 20 43 20 4c 69 6e 6b 65 |he THINK| C Linke|
|00001230| 72 0d 77 69 6c 6c 20 6f | 74 68 65 72 77 69 73 65 |r.will o|therwise|
|00001240| 20 63 6f 6d 70 6c 61 69 | 6e 2e 0d 0d 64 67 70 20 | complai|n...dgp |
|00001250| 26 20 64 68 62 2e 0d 43 | 6f 70 79 72 69 67 68 74 |& dhb..C|opyright|
|00001260| 20 31 39 38 39 2d 31 39 | 39 34 20 a9 20 44 65 6e | 1989-19|94 . Den|
|00001270| 69 73 20 47 2e 20 50 65 | 6c 6c 69 0d 0d 48 49 53 |is G. Pe|lli..HIS|
|00001280| 54 4f 52 59 3a 20 28 6f | 6d 69 74 74 69 6e 67 20 |TORY: (o|mitting |
|00001290| 63 68 61 6e 67 65 73 20 | 64 6f 63 75 6d 65 6e 74 |changes |document|
|000012a0| 65 64 20 69 6e 20 43 20 | 66 69 6c 65 73 29 0d 32 |ed in C |files).2|
|000012b0| 2f 32 30 2f 39 33 20 64 | 68 62 09 41 64 64 65 64 |/20/93 d|hb.Added|
|000012c0| 20 76 61 72 69 6f 75 73 | 20 63 6f 6d 6d 6f 6e 6c | various| commonl|
|000012d0| 79 20 75 73 65 64 20 68 | 65 61 64 65 72 73 2e 20 |y used h|eaders. |
|000012e0| 20 0d 09 09 09 52 65 73 | 74 72 75 63 74 75 72 65 | ....Res|tructure|
|000012f0| 64 20 73 6f 20 74 68 61 | 74 20 6f 6e 6c 79 20 56 |d so tha|t only V|
|00001300| 69 64 65 6f 54 6f 6f 6c | 62 6f 78 2e 68 20 68 61 |ideoTool|box.h ha|
|00001310| 73 20 74 6f 20 62 65 20 | 69 6e 63 6c 75 64 65 64 |s to be |included|
|00001320| 2c 0d 09 09 09 77 68 65 | 74 68 65 72 20 6f 6e 65 |,....whe|ther one|
|00001330| 20 69 73 20 63 72 65 61 | 74 69 6e 67 20 73 74 61 | is crea|ting sta|
|00001340| 6e 64 2d 61 6c 6f 6e 65 | 20 54 48 49 4e 4b 20 43 |nd-alone| THINK C|
|00001350| 20 6f 72 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 | or code| resourc|
|00001360| 65 73 0d 09 09 09 74 6f | 20 62 65 20 63 61 6c 6c |es....to| be call|
|00001370| 65 64 20 62 79 20 4d 41 | 54 4c 41 42 2e 20 45 76 |ed by MA|TLAB. Ev|
|00001380| 65 72 79 74 68 69 6e 67 | 20 74 68 61 74 20 63 61 |erything| that ca|
|00001390| 72 65 73 20 69 73 20 70 | 72 6f 70 65 72 6c 79 20 |res is p|roperly |
|000013a0| 63 6f 6e 64 69 74 69 6f | 6e 65 64 0d 09 09 09 62 |conditio|ned....b|
|000013b0| 79 20 74 68 65 20 73 79 | 6d 62 6f 6c 20 4d 41 54 |y the sy|mbol MAT|
|000013c0| 4c 41 42 2e 0d 37 2f 39 | 2f 39 33 09 64 67 70 09 |LAB..7/9|/93.dgp.|
|000013d0| 43 68 61 6e 67 65 64 20 | 6f 75 72 20 63 6f 6e 76 |Changed |our conv|
|000013e0| 65 6e 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 20 4d |ention f|or the M|
|000013f0| 41 54 4c 41 42 20 73 79 | 6d 62 6f 6c 2c 20 64 65 |ATLAB sy|mbol, de|
|00001400| 66 69 6e 69 6e 67 20 69 | 74 20 61 73 0d 09 09 09 |fining i|t as....|
|00001410| 31 20 6f 72 20 30 20 69 | 6e 73 74 65 61 64 20 6f |1 or 0 i|nstead o|
|00001420| 66 20 64 65 66 69 6e 69 | 6e 67 20 6f 72 20 6c 65 |f defini|ng or le|
|00001430| 61 76 69 6e 67 20 75 6e | 64 65 66 69 6e 65 64 2e |aving un|defined.|
|00001440| 20 54 68 65 20 61 64 76 | 61 6e 74 61 67 65 20 6f | The adv|antage o|
|00001450| 66 0d 09 09 09 74 68 69 | 73 20 61 70 70 72 6f 61 |f....thi|s approa|
|00001460| 63 68 20 69 73 20 74 68 | 61 74 20 22 4d 41 54 4c |ch is th|at "MATL|
|00001470| 41 42 22 20 63 61 6e 20 | 6e 6f 77 20 62 65 20 75 |AB" can |now be u|
|00001480| 73 65 64 20 61 73 20 61 | 6e 20 61 72 67 75 6d 65 |sed as a|n argume|
|00001490| 6e 74 20 69 6e 20 61 6e | 0d 09 09 09 6f 72 64 69 |nt in an|....ordi|
|000014a0| 6e 61 72 79 20 69 66 20 | 73 74 61 74 65 6d 65 6e |nary if |statemen|
|000014b0| 74 2c 20 77 68 69 63 68 | 20 69 73 20 6d 75 63 68 |t, which| is much|
|000014c0| 20 6d 6f 72 65 20 72 65 | 61 64 61 62 6c 65 20 74 | more re|adable t|
|000014d0| 68 61 6e 20 23 69 66 2e | 0d 38 2f 32 31 2f 39 33 |han #if.|.8/21/93|
|000014e0| 09 64 68 62 09 41 64 64 | 65 64 20 75 6e 64 65 66 |.dhb.Add|ed undef|
|000014f0| 73 20 69 6e 20 23 69 66 | 20 4d 41 54 4c 41 42 20 |s in #if| MATLAB |
|00001500| 73 6f 20 74 68 61 74 20 | 6d 65 6d 6f 72 79 20 61 |so that |memory a|
|00001510| 6c 6c 6f 63 61 74 69 6f | 6e 20 67 6f 65 73 20 74 |llocatio|n goes t|
|00001520| 68 72 6f 75 67 68 20 54 | 48 49 4e 4b 20 43 20 0d |hrough T|HINK C .|
|00001530| 09 09 09 6c 69 62 72 61 | 72 79 2c 20 6e 6f 74 20 |...libra|ry, not |
|00001540| 61 73 20 63 61 6c 6c 62 | 61 63 6b 2e 20 43 61 6c |as callb|ack. Cal|
|00001550| 6c 62 61 63 6b 73 20 77 | 6f 75 6c 64 20 62 65 20 |lbacks w|ould be |
|00001560| 4f 4b 20 65 78 63 65 70 | 74 20 74 68 61 74 20 74 |OK excep|t that t|
|00001570| 68 65 20 4d 61 74 68 77 | 6f 72 6b 73 20 0d 09 09 |he Mathw|orks ...|
|00001580| 09 66 6f 72 67 6f 74 20 | 74 6f 20 67 69 76 65 20 |.forgot |to give |
|00001590| 75 73 20 6f 6e 65 20 66 | 6f 72 20 72 65 61 6c 6c |us one f|or reall|
|000015a0| 6f 63 2e 20 54 68 69 73 | 20 6c 65 61 64 73 20 74 |oc. This| leads t|
|000015b0| 6f 20 6d 69 78 69 6e 67 | 20 6d 65 6d 6f 72 79 20 |o mixing| memory |
|000015c0| 6d 61 6e 61 67 65 72 73 | 0d 20 09 09 09 6f 6e 20 |managers|. ...on |
|000015d0| 74 68 65 20 73 61 6d 65 | 20 70 6f 69 6e 74 65 72 |the same| pointer|
|000015e0| 73 20 2d 2d 20 62 61 64 | 20 62 61 64 20 62 61 64 |s -- bad| bad bad|
|000015f0| 2e 0d 39 2f 32 2f 39 33 | 09 64 68 62 09 63 6f 6d |..9/2/93|.dhb.com|
|00001600| 6d 65 6e 74 65 64 20 6f | 75 74 20 23 69 6e 63 6c |mented o|ut #incl|
|00001610| 75 64 65 20 3c 54 72 61 | 6e 73 6c 61 74 65 4c 69 |ude <Tra|nslateLi|
|00001620| 6e 65 66 65 65 64 73 2e | 68 3e 20 73 69 6e 63 65 |nefeeds.|h> since|
|00001630| 20 69 74 27 73 0d 09 09 | 09 6e 6f 74 20 70 72 65 | it's...|.not pre|
|00001640| 73 65 6e 74 6c 79 20 63 | 6f 6d 70 61 74 69 62 6c |sently c|ompatibl|
|00001650| 65 20 77 69 74 68 20 4d | 41 54 4c 41 42 2e 0d 39 |e with M|ATLAB..9|
|00001660| 2f 32 2f 39 33 09 64 67 | 70 09 4d 6f 76 65 64 20 |/2/93.dg|p.Moved |
|00001670| 74 68 65 20 4e 4c 20 61 | 6e 64 20 4e 45 57 4c 49 |the NL a|nd NEWLI|
|00001680| 4e 45 20 6d 61 63 72 6f | 73 20 66 72 6f 6d 20 41 |NE macro|s from A|
|00001690| 73 73 69 67 6e 2e 63 20 | 69 6e 74 6f 20 74 68 69 |ssign.c |into thi|
|000016a0| 73 20 66 69 6c 65 2e 0d | 39 2f 38 2f 39 33 09 64 |s file..|9/8/93.d|
|000016b0| 67 70 09 4d 65 6e 74 69 | 6f 6e 20 56 69 64 65 6f |gp.Menti|on Video|
|000016c0| 54 6f 6f 6c 62 6f 78 2e | 63 2e 0d 39 2f 31 31 2f |Toolbox.|c..9/11/|
|000016d0| 39 33 09 64 68 62 2c 64 | 67 70 09 44 65 66 69 6e |93.dhb,d|gp.Defin|
|000016e0| 65 20 53 54 44 49 4f 5f | 49 4e 54 20 61 6e 64 20 |e STDIO_|INT and |
|000016f0| 53 54 44 49 4f 5f 44 4f | 55 42 4c 45 2e 0d 39 2f |STDIO_DO|UBLE..9/|
|00001700| 31 32 2f 39 33 09 64 68 | 62 09 43 68 61 6e 67 65 |12/93.dh|b.Change|
|00001710| 20 53 54 44 49 4f 5f 2e | 2e 2e 20 74 6f 20 50 52 | STDIO_.|.. to PR|
|00001720| 49 4e 54 46 5f 2e 2e 2e | 20 61 6e 64 20 53 43 41 |INTF_...| and SCA|
|00001730| 4e 46 5f 2e 2e 2e 0d 09 | 09 09 49 6e 73 65 72 74 |NF_.....|..Insert|
|00001740| 20 63 6f 6e 64 69 74 69 | 6f 6e 61 6c 20 66 6f 72 | conditi|onal for|
|00001750| 20 4d 41 54 4c 41 42 20 | 33 2e 35 20 76 73 2e 20 | MATLAB |3.5 vs. |
|00001760| 34 2e 78 0d 39 2f 31 34 | 2f 39 33 09 64 68 62 09 |4.x.9/14|/93.dhb.|
|00001770| 43 6f 6e 64 69 74 69 6f | 6e 61 6c 20 66 6f 72 20 |Conditio|nal for |
|00001780| 4d 41 54 4c 41 42 20 63 | 68 61 6e 67 65 64 20 74 |MATLAB c|hanged t|
|00001790| 6f 20 6d 61 6b 65 20 73 | 79 6d 62 6f 6c 20 6d 61 |o make s|ymbol ma|
|000017a0| 74 63 68 20 6d 61 6a 6f | 72 20 76 65 72 73 69 6f |tch majo|r versio|
|000017b0| 6e 20 6e 75 6d 62 65 72 | 2e 0d 09 09 09 52 65 6d |n number|.....Rem|
|000017c0| 6f 76 65 64 20 74 72 61 | 63 65 73 20 6f 66 20 6f |oved tra|ces of o|
|000017d0| 6c 64 20 74 72 79 69 6e | 67 20 74 6f 20 66 6f 72 |ld tryin|g to for|
|000017e0| 63 65 20 34 20 62 79 74 | 65 20 69 6e 74 73 20 66 |ce 4 byt|e ints f|
|000017f0| 6f 72 20 4d 41 54 4c 41 | 42 2e 0d 39 2f 31 34 2f |or MATLA|B..9/14/|
|00001800| 39 33 09 64 67 70 09 4d | 6f 76 65 64 20 75 70 20 |93.dgp.M|oved up |
|00001810| 69 6e 63 6c 75 73 69 6f | 6e 20 6f 66 20 51 75 69 |inclusio|n of Qui|
|00001820| 63 6b 44 72 61 77 2e 68 | 20 62 65 66 6f 72 65 20 |ckDraw.h| before |
|00001830| 4d 41 54 4c 41 42 20 73 | 74 75 66 66 2c 20 73 69 |MATLAB s|tuff, si|
|00001840| 6e 63 65 20 63 6d 65 78 | 2e 68 0d 09 09 09 72 65 |nce cmex|.h....re|
|00001850| 71 75 69 72 65 73 20 69 | 74 2e 20 46 69 78 65 64 |quires i|t. Fixed|
|00001860| 20 74 79 70 6f 2c 20 63 | 68 61 6e 67 69 6e 67 20 | typo, c|hanging |
|00001870| 22 23 65 6c 73 65 69 66 | 22 20 74 6f 20 22 23 65 |"#elseif|" to "#e|
|00001880| 6c 69 66 22 2e 0d 39 2f | 31 35 2f 39 33 09 64 67 |lif"..9/|15/93.dg|
|00001890| 70 09 45 64 69 74 65 64 | 20 74 68 65 20 63 6f 6d |p.Edited| the com|
|000018a0| 6d 65 6e 74 73 20 61 62 | 6f 76 65 2c 20 72 65 66 |ments ab|ove, ref|
|000018b0| 65 72 72 69 6e 67 20 74 | 6f 20 56 69 64 65 6f 54 |erring t|o VideoT|
|000018c0| 6f 6f 6c 62 6f 78 2e 63 | 20 61 6e 64 20 74 68 65 |oolbox.c| and the|
|000018d0| 20 6e 65 77 20 0d 09 09 | 09 56 69 64 65 6f 54 6f | new ...|.VideoTo|
|000018e0| 6f 6c 62 6f 78 4d 41 54 | 4c 41 42 2e 63 2e 0d 39 |olboxMAT|LAB.c..9|
|000018f0| 2f 31 36 2f 39 33 09 64 | 67 70 09 41 64 64 65 64 |/16/93.d|gp.Added|
|00001900| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 66 6f 72 | content|s of for|
|00001910| 6d 65 72 20 41 73 73 69 | 67 6e 2e 68 2e 0d 09 09 |mer Assi|gn.h....|
|00001920| 09 44 65 66 69 6e 65 64 | 20 4d 41 43 5f 43 20 73 |.Defined| MAC_C s|
|00001930| 6f 20 74 68 61 74 20 74 | 68 65 20 56 69 64 65 6f |o that t|he Video|
|00001940| 54 6f 6f 6c 62 6f 78 2e | 68 20 68 65 61 64 65 72 |Toolbox.|h header|
|00001950| 20 6d 61 79 20 62 65 20 | 75 73 65 64 20 77 69 74 | may be |used wit|
|00001960| 68 0d 09 09 09 53 74 61 | 6e 64 61 72 64 20 43 2e |h....Sta|ndard C.|
|00001970| 0d 39 2f 31 36 2f 39 33 | 09 64 68 62 20 52 65 6d |.9/16/93|.dhb Rem|
|00001980| 6f 76 65 64 20 70 72 6f | 74 6f 74 79 70 65 20 66 |oved pro|totype f|
|00001990| 6f 72 20 6f 62 73 6f 6c | 65 74 65 20 47 65 74 44 |or obsol|ete GetD|
|000019a0| 61 74 65 54 69 6d 65 53 | 74 72 69 6e 67 2e 0d 31 |ateTimeS|tring..1|
|000019b0| 30 2f 32 2f 39 33 09 64 | 67 70 09 41 64 64 65 64 |0/2/93.d|gp.Added|
|000019c0| 20 23 69 6e 63 6c 75 64 | 65 20 3c 45 72 72 6f 72 | #includ|e <Error|
|000019d0| 73 2e 68 3e 2e 0d 31 32 | 2f 31 2f 39 33 20 64 67 |s.h>..12|/1/93 dg|
|000019e0| 70 20 4e 6f 77 20 61 6c | 77 61 79 73 20 77 72 69 |p Now al|ways wri|
|000019f0| 74 65 20 22 4d 41 54 4c | 41 42 22 20 69 6e 20 61 |te "MATL|AB" in a|
|00001a00| 6c 6c 20 63 61 70 73 2c | 20 73 69 6e 63 65 20 74 |ll caps,| since t|
|00001a10| 68 61 74 27 73 20 74 68 | 65 20 74 72 61 64 65 6d |hat's th|e tradem|
|00001a20| 61 72 6b 65 64 20 6e 61 | 6d 65 2e 0d 31 32 2f 31 |arked na|me..12/1|
|00001a30| 36 2f 39 33 20 64 68 62 | 20 53 6f 6d 65 77 68 65 |6/93 dhb| Somewhe|
|00001a40| 72 65 20 74 68 69 6e 67 | 73 20 67 6f 74 20 6d 75 |re thing|s got mu|
|00001a50| 6e 67 65 64 2e 20 20 43 | 6f 6e 64 69 74 69 6f 6e |nged. C|ondition|
|00001a60| 61 6c 20 66 6f 72 20 4d | 41 54 4c 41 42 20 76 65 |al for M|ATLAB ve|
|00001a70| 72 73 69 6f 6e 20 61 70 | 70 65 61 72 65 64 0d 20 |rsion ap|peared. |
|00001a80| 20 20 20 20 20 20 20 20 | 20 20 62 65 66 6f 72 65 | | before|
|00001a90| 20 69 6e 63 6c 75 73 69 | 6f 6e 20 6f 66 20 63 6d | inclusi|on of cm|
|00001aa0| 65 78 2c 20 77 68 69 63 | 68 20 77 6f 6e 27 74 20 |ex, whic|h won't |
|00001ab0| 77 6f 72 6b 2e 20 20 49 | 20 66 69 78 65 64 20 74 |work. I| fixed t|
|00001ac0| 68 65 20 6f 72 64 65 72 | 2e 0d 31 32 2f 31 36 2f |he order|..12/16/|
|00001ad0| 39 33 20 64 68 62 20 43 | 6f 6d 6d 65 6e 74 65 64 |93 dhb C|ommented|
|00001ae0| 20 6f 75 74 20 69 6e 63 | 6c 75 73 69 6f 6e 20 6f | out inc|lusion o|
|00001af0| 66 20 54 72 61 6e 73 6c | 61 74 65 4c 69 6e 65 46 |f Transl|ateLineF|
|00001b00| 65 65 64 73 2e 68 20 64 | 6f 77 6e 20 62 65 6c 6f |eeds.h d|own belo|
|00001b10| 77 2e 20 20 54 68 69 73 | 0d 20 20 20 20 20 20 20 |w. This|. |
|00001b20| 20 20 20 20 67 65 6e 65 | 72 61 74 65 73 20 61 20 | gene|rates a |
|00001b30| 6c 69 6e 6b 20 65 72 72 | 6f 72 20 66 72 6f 6d 20 |link err|or from |
|00001b40| 4d 41 54 4c 41 42 2e 0d | 31 32 2f 32 39 2f 39 33 |MATLAB..|12/29/93|
|00001b50| 20 64 67 70 20 61 64 64 | 65 64 20 23 69 6e 63 6c | dgp add|ed #incl|
|00001b60| 75 64 65 20 3c 50 61 63 | 6b 61 67 65 73 2e 68 3e |ude <Pac|kages.h>|
|00001b70| 0d 36 2f 31 32 2f 39 34 | 20 20 64 67 70 20 61 64 |.6/12/94| dgp ad|
|00001b80| 64 65 64 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |ded defi|nition o|
|00001b90| 66 20 41 70 70 6c 65 27 | 73 20 6e 65 77 20 42 6c |f Apple'|s new Bl|
|00001ba0| 6f 63 6b 4d 6f 76 65 44 | 61 74 61 2c 20 66 6f 72 |ockMoveD|ata, for|
|00001bb0| 20 63 6f 6d 70 61 74 69 | 62 69 6c 69 74 79 20 77 | compati|bility w|
|00001bc0| 69 74 68 0d 09 09 09 41 | 70 70 6c 65 27 73 20 6f |ith....A|pple's o|
|00001bd0| 6c 64 20 70 72 65 2d 55 | 6e 69 76 65 72 73 61 6c |ld pre-U|niversal|
|00001be0| 20 68 65 61 64 65 72 20 | 66 69 6c 65 73 2e 0d 36 | header |files..6|
|00001bf0| 2f 31 32 2f 39 34 09 64 | 67 70 20 23 69 6e 63 6c |/12/94.d|gp #incl|
|00001c00| 75 64 65 20 53 74 72 69 | 6e 67 73 2e 68 20 69 66 |ude Stri|ngs.h if|
|00001c10| 20 55 6e 69 76 65 72 73 | 61 6c 20 68 65 61 64 65 | Univers|al heade|
|00001c20| 72 20 66 69 6c 65 73 20 | 61 72 65 20 75 73 65 64 |r files |are used|
|00001c30| 2e 0d 37 2f 32 38 2f 39 | 34 20 64 67 70 20 41 64 |..7/28/9|4 dgp Ad|
|00001c40| 64 65 64 20 74 65 73 74 | 20 66 6f 72 20 4d 65 74 |ded test| for Met|
|00001c50| 72 6f 77 65 72 6b 73 20 | 43 6f 64 65 57 61 72 72 |rowerks |CodeWarr|
|00001c60| 69 6f 72 20 43 2e 0d 39 | 2f 32 2f 39 34 09 64 67 |ior C..9|/2/94.dg|
|00001c70| 70 20 23 69 6e 63 6c 75 | 64 65 20 4d 61 63 4d 65 |p #inclu|de MacMe|
|00001c80| 6d 6f 72 79 2e 68 0d 39 | 2f 35 2f 39 34 09 64 67 |mory.h.9|/5/94.dg|
|00001c90| 70 20 63 68 61 6e 67 65 | 64 20 22 69 6e 74 22 20 |p change|d "int" |
|00001ca0| 74 6f 20 22 73 68 6f 72 | 74 20 69 6e 74 22 20 69 |to "shor|t int" i|
|00001cb0| 6e 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 6f 66 |n defini|tions of|
|00001cc0| 20 50 52 49 4e 54 46 5f | 49 4e 54 20 61 6e 64 20 | PRINTF_|INT and |
|00001cd0| 53 43 41 4e 46 5f 49 4e | 54 20 66 6f 72 0d 09 09 |SCANF_IN|T for...|
|00001ce0| 09 4d 41 54 4c 41 42 20 | 34 2e 20 54 68 69 73 20 |.MATLAB |4. This |
|00001cf0| 69 73 20 62 61 73 65 64 | 20 6f 6e 20 63 6f 6d 6d |is based| on comm|
|00001d00| 6f 6e 20 73 65 6e 73 65 | 2c 20 6e 6f 74 20 74 65 |on sense|, not te|
|00001d10| 73 74 69 6e 67 20 6f 72 | 20 64 65 74 61 69 6c 65 |sting or| detaile|
|00001d20| 64 20 6b 6e 6f 77 6c 65 | 64 67 65 2e 0d 33 2f 33 |d knowle|dge..3/3|
|00001d30| 31 2f 39 35 09 64 67 70 | 09 41 73 20 61 20 67 65 |1/95.dgp|.As a ge|
|00001d40| 73 74 75 72 65 20 6f 66 | 20 73 75 70 70 6f 72 74 |sture of| support|
|00001d50| 20 66 6f 72 20 53 79 6d | 61 6e 74 65 63 20 54 48 | for Sym|antec TH|
|00001d60| 49 4e 4b 20 43 20 38 2c | 20 6e 6f 77 20 64 65 66 |INK C 8,| now def|
|00001d70| 69 6e 65 20 54 48 49 4e | 4b 5f 43 2e 0d 2a 2f 0d |ine THIN|K_C..*/.|
|00001d80| 23 70 72 61 67 6d 61 20 | 6f 6e 63 65 09 09 09 2f |#pragma |once.../|
|00001d90| 2a 20 20 73 75 70 70 72 | 65 73 73 20 6d 75 6c 74 |* suppr|ess mult|
|00001da0| 69 70 6c 65 20 69 6e 63 | 6c 75 73 69 6f 6e 73 20 |iple inc|lusions |
|00001db0| 6f 66 20 74 68 69 73 20 | 66 69 6c 65 20 2a 2f 0d |of this |file */.|
|00001dc0| 23 69 66 6e 64 65 66 20 | 5f 56 49 44 45 4f 54 4f |#ifndef |_VIDEOTO|
|00001dd0| 4f 4c 42 4f 58 5f 09 2f | 2a 20 20 73 75 70 70 72 |OLBOX_./|* suppr|
|00001de0| 65 73 73 20 6d 75 6c 74 | 69 70 6c 65 20 69 6e 63 |ess mult|iple inc|
|00001df0| 6c 75 73 69 6f 6e 73 20 | 6f 66 20 74 68 69 73 20 |lusions |of this |
|00001e00| 66 69 6c 65 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |file */.|#define |
|00001e10| 5f 56 49 44 45 4f 54 4f | 4f 4c 42 4f 58 5f 0d 2f |_VIDEOTO|OLBOX_./|
|00001e20| 2a 0d 48 65 61 64 65 72 | 20 66 69 6c 65 73 20 74 |*.Header| files t|
|00001e30| 68 61 74 20 61 72 65 20 | 72 65 71 75 69 72 65 64 |hat are |required|
|00001e40| 20 66 6f 72 20 73 75 63 | 63 65 73 73 66 75 6c 20 | for suc|cessful |
|00001e50| 63 6f 6d 70 69 6c 61 74 | 69 6f 6e 20 6f 66 20 74 |compilat|ion of t|
|00001e60| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 69 73 0d |he rest |of this.|
|00001e70| 66 69 6c 65 20 61 72 65 | 20 6d 61 72 6b 65 64 20 |file are| marked |
|00001e80| 22 72 65 71 75 69 72 65 | 64 22 2e 0d 2a 2f 0d 23 |"require|d"..*/.#|
|00001e90| 69 66 20 64 65 66 69 6e | 65 64 28 53 59 4d 41 4e |if defin|ed(SYMAN|
|00001ea0| 54 45 43 5f 43 29 0d 09 | 23 69 66 20 21 64 65 66 |TEC_C)..|#if !def|
|00001eb0| 69 6e 65 64 28 54 48 49 | 4e 4b 5f 43 29 0d 09 09 |ined(THI|NK_C)...|
|00001ec0| 23 64 65 66 69 6e 65 20 | 54 48 49 4e 4b 5f 43 20 |#define |THINK_C |
|00001ed0| 38 0d 09 23 65 6e 64 69 | 66 0d 23 65 6e 64 69 66 |8..#endi|f.#endif|
|00001ee0| 0d 23 69 66 20 54 48 49 | 4e 4b 5f 43 09 09 09 09 |.#if THI|NK_C....|
|00001ef0| 2f 2a 20 54 48 49 4e 4b | 20 43 20 2a 2f 09 5c 0d |/* THINK| C */.\.|
|00001f00| 09 7c 7c 20 61 70 70 6c | 65 63 09 09 09 2f 2a 20 |.|| appl|ec.../* |
|00001f10| 4d 50 57 20 43 2c 20 70 | 72 65 73 75 6d 61 62 6c |MPW C, p|resumabl|
|00001f20| 79 20 77 69 74 68 20 4d | 61 63 20 65 78 74 65 6e |y with M|ac exten|
|00001f30| 73 69 6f 6e 73 20 2a 2f | 5c 0d 09 7c 7c 20 5f 5f |sions */|\..|| __|
|00001f40| 4d 57 45 52 4b 53 5f 5f | 09 09 2f 2a 20 4d 65 74 |MWERKS__|../* Met|
|00001f50| 72 6f 77 65 72 6b 73 20 | 43 6f 64 65 57 61 72 72 |rowerks |CodeWarr|
|00001f60| 69 6f 72 20 43 2c 20 22 | 20 2a 2f 0d 09 23 69 66 |ior C, "| */..#if|
|00001f70| 20 54 48 49 4e 4b 5f 43 | 0d 09 09 23 69 66 20 5f | THINK_C|...#if _|
|00001f80| 5f 6f 70 74 69 6f 6e 28 | 74 68 69 6e 6b 63 29 0d |_option(|thinkc).|
|00001f90| 09 09 09 23 64 65 66 69 | 6e 65 20 4d 41 43 5f 43 |...#defi|ne MAC_C|
|00001fa0| 20 31 09 09 2f 2a 20 61 | 6c 6c 6f 77 20 4d 61 63 | 1../* a|llow Mac|
|00001fb0| 69 6e 74 6f 73 68 20 43 | 20 65 78 74 65 6e 73 69 |intosh C| extensi|
|00001fc0| 6f 6e 73 3a 20 22 70 61 | 73 63 61 6c 22 2c 20 22 |ons: "pa|scal", "|
|00001fd0| 73 68 6f 72 74 20 64 6f | 75 62 6c 65 22 2c 20 65 |short do|uble", e|
|00001fe0| 74 63 2e 20 2a 2f 0d 09 | 09 23 65 6c 73 65 0d 09 |tc. */..|.#else..|
|00001ff0| 09 09 23 64 65 66 69 6e | 65 20 4d 41 43 5f 43 20 |..#defin|e MAC_C |
|00002000| 30 09 09 2f 2a 20 53 74 | 61 6e 64 61 72 64 20 43 |0../* St|andard C|
|00002010| 20 2a 2f 0d 09 09 23 65 | 6e 64 69 66 0d 09 23 65 | */...#e|ndif..#e|
|00002020| 6c 73 65 0d 09 09 23 64 | 65 66 69 6e 65 20 4d 41 |lse...#d|efine MA|
|00002030| 43 5f 43 20 31 09 09 09 | 2f 2a 20 61 6c 6c 6f 77 |C_C 1...|/* allow|
|00002040| 20 4d 61 63 69 6e 74 6f | 73 68 20 43 20 65 78 74 | Macinto|sh C ext|
|00002050| 65 6e 73 69 6f 6e 73 3a | 20 22 70 61 73 63 61 6c |ensions:| "pascal|
|00002060| 22 2c 20 22 73 68 6f 72 | 74 20 64 6f 75 62 6c 65 |", "shor|t double|
|00002070| 22 2c 20 65 74 63 2e 20 | 2a 2f 0d 09 23 65 6e 64 |", etc. |*/..#end|
|00002080| 69 66 0d 23 65 6c 73 65 | 0d 09 23 64 65 66 69 6e |if.#else|..#defin|
|00002090| 65 20 4d 41 43 5f 43 20 | 30 09 09 09 09 2f 2a 20 |e MAC_C |0..../* |
|000020a0| 53 74 61 6e 64 61 72 64 | 20 43 20 2a 2f 0d 23 65 |Standard| C */.#e|
|000020b0| 6e 64 69 66 0d 23 69 66 | 6e 64 65 66 20 53 48 4f |ndif.#if|ndef SHO|
|000020c0| 52 54 5f 44 4f 55 42 4c | 45 5f 4f 4b 0d 09 23 69 |RT_DOUBL|E_OK..#i|
|000020d0| 66 20 53 59 4d 41 4e 54 | 45 43 5f 43 0d 09 09 2f |f SYMANT|EC_C.../|
|000020e0| 2a 20 22 73 68 6f 72 74 | 20 64 6f 75 62 6c 65 22 |* "short| double"|
|000020f0| 20 6e 6f 74 20 73 75 70 | 70 6f 72 74 65 64 20 62 | not sup|ported b|
|00002100| 79 20 54 48 49 4e 4b 20 | 43 20 38 20 2a 2f 0d 09 |y THINK |C 8 */..|
|00002110| 23 65 6c 73 65 0d 09 09 | 23 64 65 66 69 6e 65 20 |#else...|#define |
|00002120| 53 48 4f 52 54 5f 44 4f | 55 42 4c 45 5f 4f 4b 20 |SHORT_DO|UBLE_OK |
|00002130| 4d 41 43 5f 43 09 2f 2a | 20 22 73 68 6f 72 74 20 |MAC_C./*| "short |
|00002140| 64 6f 75 62 6c 65 22 20 | 6e 6f 74 20 61 6c 6c 6f |double" |not allo|
|00002150| 77 65 64 20 62 79 20 53 | 74 61 6e 64 61 72 64 20 |wed by S|tandard |
|00002160| 43 20 2a 2f 0d 09 23 65 | 6e 64 69 66 0d 23 65 6e |C */..#e|ndif.#en|
|00002170| 64 69 66 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |dif.#inc|lude <st|
|00002180| 64 69 6f 2e 68 3e 09 09 | 09 2f 2a 20 20 72 65 71 |dio.h>..|./* req|
|00002190| 75 69 72 65 64 20 2a 2f | 0d 23 69 6e 63 6c 75 64 |uired */|.#includ|
|000021a0| 65 20 3c 73 74 64 6c 69 | 62 2e 68 3e 0d 23 69 66 |e <stdli|b.h>.#if|
|000021b0| 20 4d 41 43 5f 43 0d 09 | 23 69 6e 63 6c 75 64 65 | MAC_C..|#include|
|000021c0| 20 3c 51 75 69 63 6b 64 | 72 61 77 2e 68 3e 09 2f | <Quickd|raw.h>./|
|000021d0| 2a 20 20 72 65 71 75 69 | 72 65 64 20 2a 2f 0d 23 |* requi|red */.#|
|000021e0| 65 6e 64 69 66 0d 23 69 | 66 6e 64 65 66 20 4d 41 |endif.#i|fndef MA|
|000021f0| 54 4c 41 42 0d 09 23 64 | 65 66 69 6e 65 20 4d 41 |TLAB..#d|efine MA|
|00002200| 54 4c 41 42 20 30 0d 23 | 65 6e 64 69 66 0d 23 69 |TLAB 0.#|endif.#i|
|00002210| 66 20 4d 41 54 4c 41 42 | 0d 09 2f 2a 0d 09 54 68 |f MATLAB|../*..Th|
|00002220| 69 73 20 6d 75 73 74 20 | 63 6f 6d 65 20 61 66 74 |is must |come aft|
|00002230| 65 72 20 73 74 64 6c 69 | 62 2e 68 2c 20 73 74 64 |er stdli|b.h, std|
|00002240| 69 6f 2e 68 2c 20 61 6e | 64 20 51 75 69 63 6b 44 |io.h, an|d QuickD|
|00002250| 72 61 77 2e 68 20 61 6e | 64 20 62 65 66 6f 72 65 |raw.h an|d before|
|00002260| 20 65 76 65 72 79 74 68 | 69 6e 67 0d 09 65 6c 73 | everyth|ing..els|
|00002270| 65 2e 20 49 66 20 4d 41 | 54 4c 41 42 20 69 73 20 |e. If MA|TLAB is |
|00002280| 74 72 75 65 20 74 68 65 | 6e 20 77 65 20 69 6e 63 |true the|n we inc|
|00002290| 6c 75 64 65 20 74 68 65 | 20 68 65 61 64 65 72 20 |lude the| header |
|000022a0| 66 69 6c 65 20 63 6d 65 | 78 2e 68 2e 20 20 4f 74 |file cme|x.h. Ot|
|000022b0| 68 65 72 77 69 73 65 20 | 77 65 0d 09 64 65 66 69 |herwise |we..defi|
|000022c0| 6e 65 20 74 68 65 20 64 | 61 74 61 20 74 79 70 65 |ne the d|ata type|
|000022d0| 73 20 74 68 61 74 20 61 | 72 65 20 6e 6f 72 6d 61 |s that a|re norma|
|000022e0| 6c 6c 79 20 70 72 6f 76 | 69 64 65 64 20 62 79 20 |lly prov|ided by |
|000022f0| 74 68 61 74 20 68 65 61 | 64 65 72 2c 20 73 6f 20 |that hea|der, so |
|00002300| 74 68 61 74 20 63 6f 64 | 65 0d 09 74 68 61 74 20 |that cod|e..that |
|00002310| 75 73 65 73 20 74 68 65 | 73 65 20 74 79 70 65 73 |uses the|se types|
|00002320| 20 6d 61 79 20 62 65 20 | 63 6f 6d 70 69 6c 65 64 | may be |compiled|
|00002330| 20 66 6f 72 20 75 73 65 | 20 69 6e 20 61 70 70 6c | for use| in appl|
|00002340| 69 63 61 74 69 6f 6e 73 | 2e 20 20 49 74 20 6d 75 |ications|. It mu|
|00002350| 73 74 20 63 6f 6d 65 0d | 09 62 65 66 6f 72 65 20 |st come.|.before |
|00002360| 77 65 20 74 65 73 74 20 | 66 6f 72 20 76 65 72 73 |we test |for vers|
|00002370| 69 6f 6e 20 33 20 6f 72 | 20 34 2e 20 20 54 68 65 |ion 3 or| 4. The|
|00002380| 20 76 65 72 73 69 6f 6e | 20 33 20 63 6d 65 78 2e | version| 3 cmex.|
|00002390| 68 20 64 6f 65 73 20 6e | 6f 74 20 64 65 66 69 6e |h does n|ot defin|
|000023a0| 65 20 74 68 65 0d 09 73 | 79 6d 62 6f 6c 20 6d 65 |e the..s|ymbol me|
|000023b0| 78 5f 68 3b 20 76 65 72 | 73 69 6f 6e 20 34 20 64 |x_h; ver|sion 4 d|
|000023c0| 6f 65 73 2e 20 20 54 68 | 69 73 20 69 73 20 77 68 |oes. Th|is is wh|
|000023d0| 61 74 20 77 65 20 75 73 | 65 20 74 6f 20 66 69 67 |at we us|e to fig|
|000023e0| 75 72 65 20 6f 75 74 20 | 77 68 69 63 68 0d 09 76 |ure out |which..v|
|000023f0| 65 72 73 69 6f 6e 20 77 | 65 20 61 72 65 20 63 6f |ersion w|e are co|
|00002400| 6d 70 69 6c 69 6e 67 20 | 66 6f 72 2e 20 20 53 6f |mpiling |for. So|
|00002410| 75 6e 64 20 63 6f 6d 70 | 6c 69 63 61 74 65 64 3f |und comp|licated?|
|00002420| 20 20 53 69 67 68 21 0d | 09 2a 2f 0d 09 0d 09 23 | Sigh!.|.*/....#|
|00002430| 69 6e 63 6c 75 64 65 20 | 3c 63 6d 65 78 2e 68 3e |include |<cmex.h>|
|00002440| 0d 09 2f 2f 20 54 65 73 | 74 20 66 6f 72 20 4d 41 |..// Tes|t for MA|
|00002450| 54 4c 41 42 20 34 20 6f | 72 20 4d 41 54 4c 41 42 |TLAB 4 o|r MATLAB|
|00002460| 20 33 2c 20 61 6e 64 20 | 73 65 74 20 73 79 6d 62 | 3, and |set symb|
|00002470| 6f 6c 20 61 70 70 72 6f | 70 72 69 61 74 65 6c 79 |ol appro|priately|
|00002480| 2e 0d 09 23 75 6e 64 65 | 66 20 4d 41 54 4c 41 42 |...#unde|f MATLAB|
|00002490| 0d 09 23 69 66 64 65 66 | 20 6d 65 78 5f 68 0d 09 |..#ifdef| mex_h..|
|000024a0| 09 23 64 65 66 69 6e 65 | 20 4d 41 54 4c 41 42 20 |.#define| MATLAB |
|000024b0| 34 0d 09 23 65 6c 73 65 | 0d 09 09 23 64 65 66 69 |4..#else|...#defi|
|000024c0| 6e 65 20 4d 41 54 4c 41 | 42 20 33 0d 09 23 65 6e |ne MATLA|B 3..#en|
|000024d0| 64 69 66 0d 09 23 69 66 | 6e 64 65 66 20 4d 41 43 |dif..#if|ndef MAC|
|000024e0| 5f 43 0d 09 09 23 65 72 | 72 6f 72 20 22 4d 41 54 |_C...#er|ror "MAT|
|000024f0| 4c 41 42 20 72 65 71 75 | 69 72 65 73 20 74 68 65 |LAB requ|ires the|
|00002500| 20 4d 61 63 69 6e 74 6f | 73 68 20 65 78 74 65 6e | Macinto|sh exten|
|00002510| 73 69 6f 6e 73 20 74 6f | 20 43 2e 22 0d 09 23 65 |sions to| C."..#e|
|00002520| 6e 64 69 66 0d 0d 20 20 | 20 20 2f 2f 20 55 6e 64 |ndif.. | // Und|
|00002530| 65 66 69 6e 65 20 74 68 | 65 20 6d 61 63 72 6f 73 |efine th|e macros|
|00002540| 20 74 68 61 74 20 6f 76 | 65 72 72 69 64 65 20 6d | that ov|erride m|
|00002550| 65 6d 6f 72 79 20 61 6c | 6c 6f 63 61 74 69 6f 6e |emory al|location|
|00002560| 2e 20 20 4d 41 54 4c 41 | 42 27 73 20 69 6d 70 6c |. MATLA|B's impl|
|00002570| 65 6d 65 6e 74 61 74 69 | 6f 6e 0d 20 20 20 20 2f |ementati|on. /|
|00002580| 2f 20 64 6f 65 73 6e 27 | 74 20 77 6f 72 6b 20 69 |/ doesn'|t work i|
|00002590| 66 20 79 6f 75 20 75 73 | 65 20 72 65 61 6c 6c 6f |f you us|e reallo|
|000025a0| 63 2e 0d 09 23 75 6e 64 | 65 66 20 6d 61 6c 6c 6f |c...#und|ef mallo|
|000025b0| 63 0d 09 23 75 6e 64 65 | 66 20 63 61 6c 6c 6f 63 |c..#unde|f calloc|
|000025c0| 0d 09 23 75 6e 64 65 66 | 20 66 72 65 65 0d 09 0d |..#undef| free...|
|000025d0| 09 2f 2f 20 44 65 66 69 | 6e 65 20 64 61 74 61 20 |.// Defi|ne data |
|000025e0| 74 79 70 65 73 20 66 6f | 72 20 70 72 69 6e 74 66 |types fo|r printf|
|000025f0| 2c 20 73 63 61 6e 66 2e | 0d 09 23 69 66 20 28 4d |, scanf.|..#if (M|
|00002600| 41 54 4c 41 42 20 3d 3d | 20 34 29 09 09 09 09 09 |ATLAB ==| 4).....|
|00002610| 09 2f 2a 20 56 65 72 73 | 69 6f 6e 20 34 20 2a 2f |./* Vers|ion 4 */|
|00002620| 0d 09 09 74 79 70 65 64 | 65 66 20 73 68 6f 72 74 |...typed|ef short|
|00002630| 20 69 6e 74 20 50 52 49 | 4e 54 46 5f 49 4e 54 3b | int PRI|NTF_INT;|
|00002640| 09 09 2f 2a 20 74 79 70 | 65 20 6f 66 20 61 72 67 |../* typ|e of arg|
|00002650| 75 6d 65 6e 74 73 20 74 | 6f 20 70 72 69 6e 74 66 |uments t|o printf|
|00002660| 20 65 74 20 61 6c 2e 20 | 2a 2f 0d 09 09 74 79 70 | et al. |*/...typ|
|00002670| 65 64 65 66 20 6c 6f 6e | 67 20 64 6f 75 62 6c 65 |edef lon|g double|
|00002680| 20 50 52 49 4e 54 46 5f | 44 4f 55 42 4c 45 3b 0d | PRINTF_|DOUBLE;.|
|00002690| 09 09 74 79 70 65 64 65 | 66 20 73 68 6f 72 74 20 |..typede|f short |
|000026a0| 69 6e 74 20 53 43 41 4e | 46 5f 49 4e 54 3b 09 09 |int SCAN|F_INT;..|
|000026b0| 2f 2a 20 74 79 70 65 20 | 6f 66 20 61 72 67 75 6d |/* type |of argum|
|000026c0| 65 6e 74 73 20 74 6f 20 | 73 63 61 6e 66 20 65 74 |ents to |scanf et|
|000026d0| 20 61 6c 2e 20 2a 2f 0d | 09 09 74 79 70 65 64 65 | al. */.|..typede|
|000026e0| 66 20 64 6f 75 62 6c 65 | 20 53 43 41 4e 46 5f 44 |f double| SCANF_D|
|000026f0| 4f 55 42 4c 45 3b 0d 09 | 23 65 6c 69 66 20 28 4d |OUBLE;..|#elif (M|
|00002700| 41 54 4c 41 42 20 3d 3d | 20 33 29 09 09 09 09 09 |ATLAB ==| 3).....|
|00002710| 09 2f 2a 20 56 65 72 73 | 69 6f 6e 20 33 2e 35 20 |./* Vers|ion 3.5 |
|00002720| 2a 2f 0d 09 09 74 79 70 | 65 64 65 66 20 6c 6f 6e |*/...typ|edef lon|
|00002730| 67 20 69 6e 74 20 50 52 | 49 4e 54 46 5f 49 4e 54 |g int PR|INTF_INT|
|00002740| 3b 09 09 2f 2a 20 74 79 | 70 65 20 6f 66 20 61 72 |;../* ty|pe of ar|
|00002750| 67 75 6d 65 6e 74 73 20 | 74 6f 20 70 72 69 6e 74 |guments |to print|
|00002760| 66 20 65 74 20 61 6c 2e | 20 2a 2f 0d 09 09 74 79 |f et al.| */...ty|
|00002770| 70 65 64 65 66 20 64 6f | 75 62 6c 65 20 50 52 49 |pedef do|uble PRI|
|00002780| 4e 54 46 5f 44 4f 55 42 | 4c 45 3b 0d 09 09 74 79 |NTF_DOUB|LE;...ty|
|00002790| 70 65 64 65 66 20 73 68 | 6f 72 74 20 69 6e 74 20 |pedef sh|ort int |
|000027a0| 53 43 41 4e 46 5f 49 4e | 54 3b 09 09 2f 2a 20 74 |SCANF_IN|T;../* t|
|000027b0| 79 70 65 20 6f 66 20 61 | 72 67 75 6d 65 6e 74 73 |ype of a|rguments|
|000027c0| 20 74 6f 20 73 63 61 6e | 66 20 65 74 20 61 6c 2e | to scan|f et al.|
|000027d0| 20 2a 2f 0d 09 09 74 79 | 70 65 64 65 66 20 6c 6f | */...ty|pedef lo|
|000027e0| 6e 67 20 64 6f 75 62 6c | 65 20 53 43 41 4e 46 5f |ng doubl|e SCANF_|
|000027f0| 44 4f 55 42 4c 45 3b 09 | 0d 09 23 65 6e 64 69 66 |DOUBLE;.|..#endif|
|00002800| 0d 09 23 69 66 64 65 66 | 20 54 48 49 4e 4b 5f 43 |..#ifdef| THINK_C|
|00002810| 09 2f 2a 20 44 65 63 6c | 61 72 65 20 6f 75 72 20 |./* Decl|are our |
|00002820| 6f 77 6e 20 51 75 69 63 | 6b 44 72 61 77 20 67 6c |own Quic|kDraw gl|
|00002830| 6f 62 61 6c 73 2c 20 61 | 6c 6c 6f 63 61 74 65 64 |obals, a|llocated|
|00002840| 20 62 79 20 4d 41 54 4c | 41 42 4d 61 69 6e 2e 68 | by MATL|ABMain.h|
|00002850| 20 2a 2f 0d 09 09 65 78 | 74 65 72 6e 20 54 48 49 | */...ex|tern THI|
|00002860| 4e 4b 5f 43 5f 51 44 20 | 6d 65 78 5f 71 64 3b 0d |NK_C_QD |mex_qd;.|
|00002870| 09 09 23 64 65 66 69 6e | 65 20 71 64 20 6d 65 78 |..#defin|e qd mex|
|00002880| 5f 71 64 0d 09 23 65 6c | 73 65 0d 09 09 23 64 65 |_qd..#el|se...#de|
|00002890| 66 69 6e 65 20 6d 65 78 | 5f 71 64 20 71 64 0d 09 |fine mex|_qd qd..|
|000028a0| 23 65 6e 64 69 66 0d 09 | 23 69 66 20 64 65 66 69 |#endif..|#if defi|
|000028b0| 6e 65 64 28 4d 41 49 4e | 29 09 09 09 09 09 09 2f |ned(MAIN|)....../|
|000028c0| 2a 20 53 6f 6d 65 20 6f | 6c 64 20 70 72 6f 67 72 |* Some o|ld progr|
|000028d0| 61 6d 73 20 23 64 65 66 | 69 6e 65 20 4d 41 49 4e |ams #def|ine MAIN|
|000028e0| 2e 20 2a 2f 0d 09 09 23 | 69 6e 63 6c 75 64 65 20 |. */...#|include |
|000028f0| 22 4d 41 54 4c 41 42 4d | 61 69 6e 2e 68 22 09 09 |"MATLABM|ain.h"..|
|00002900| 09 09 2f 2a 20 4e 65 77 | 20 70 72 6f 67 72 61 6d |../* New| program|
|00002910| 73 20 6a 75 73 74 20 23 | 69 6e 63 6c 75 64 65 20 |s just #|include |
|00002920| 64 69 72 65 63 74 6c 79 | 2e 20 2a 2f 0d 09 23 65 |directly|. */..#e|
|00002930| 6e 64 69 66 0d 23 65 6c | 73 65 0d 09 74 79 70 65 |ndif.#el|se..type|
|00002940| 64 65 66 20 6c 6f 6e 67 | 20 69 6e 74 20 49 4e 54 |def long| int INT|
|00002950| 3b 0d 09 23 69 66 20 53 | 48 4f 52 54 5f 44 4f 55 |;..#if S|HORT_DOU|
|00002960| 42 4c 45 5f 4f 4b 0d 09 | 09 74 79 70 65 64 65 66 |BLE_OK..|.typedef|
|00002970| 20 73 68 6f 72 74 20 64 | 6f 75 62 6c 65 20 44 4f | short d|ouble DO|
|00002980| 55 42 4c 45 3b 2f 2a 20 | 6e 6f 74 20 61 6c 6c 6f |UBLE;/* |not allo|
|00002990| 77 65 64 20 62 79 20 53 | 74 61 6e 64 61 72 64 20 |wed by S|tandard |
|000029a0| 43 20 2a 2f 0d 09 23 65 | 6e 64 69 66 0d 09 74 79 |C */..#e|ndif..ty|
|000029b0| 70 65 64 65 66 20 69 6e | 74 20 50 52 49 4e 54 46 |pedef in|t PRINTF|
|000029c0| 5f 49 4e 54 3b 09 09 09 | 2f 2a 20 74 79 70 65 20 |_INT;...|/* type |
|000029d0| 6f 66 20 61 72 67 75 6d | 65 6e 74 73 20 74 6f 20 |of argum|ents to |
|000029e0| 70 72 69 6e 74 66 20 65 | 74 20 61 6c 2e 20 2a 2f |printf e|t al. */|
|000029f0| 0d 09 74 79 70 65 64 65 | 66 20 64 6f 75 62 6c 65 |..typede|f double|
|00002a00| 20 50 52 49 4e 54 46 5f | 44 4f 55 42 4c 45 3b 0d | PRINTF_|DOUBLE;.|
|00002a10| 09 74 79 70 65 64 65 66 | 20 69 6e 74 20 53 43 41 |.typedef| int SCA|
|00002a20| 4e 46 5f 49 4e 54 3b 09 | 09 09 2f 2a 20 74 79 70 |NF_INT;.|../* typ|
|00002a30| 65 20 6f 66 20 61 72 67 | 75 6d 65 6e 74 73 20 74 |e of arg|uments t|
|00002a40| 6f 20 73 63 61 6e 66 20 | 65 74 20 61 6c 2e 20 2a |o scanf |et al. *|
|00002a50| 2f 0d 09 74 79 70 65 64 | 65 66 20 64 6f 75 62 6c |/..typed|ef doubl|
|00002a60| 65 20 53 43 41 4e 46 5f | 44 4f 55 42 4c 45 3b 0d |e SCANF_|DOUBLE;.|
|00002a70| 09 23 69 66 20 53 48 4f | 52 54 5f 44 4f 55 42 4c |.#if SHO|RT_DOUBL|
|00002a80| 45 5f 4f 4b 0d 09 09 74 | 79 70 65 64 65 66 20 73 |E_OK...t|ypedef s|
|00002a90| 74 72 75 63 74 20 7b 0d | 09 09 09 63 68 61 72 20 |truct {.|...char |
|00002aa0| 2a 6e 61 6d 65 3b 0d 09 | 09 09 49 4e 54 20 74 79 |*name;..|..INT ty|
|00002ab0| 70 65 3b 0d 09 09 09 49 | 4e 54 20 6d 3b 0d 09 09 |pe;....I|NT m;...|
|00002ac0| 09 49 4e 54 20 6e 3b 0d | 09 09 09 44 4f 55 42 4c |.INT n;.|...DOUBL|
|00002ad0| 45 20 2a 70 72 3b 0d 09 | 09 09 44 4f 55 42 4c 45 |E *pr;..|..DOUBLE|
|00002ae0| 20 2a 70 69 3b 0d 09 09 | 7d 20 4d 61 74 72 69 78 | *pi;...|} Matrix|
|00002af0| 3b 0d 09 23 65 6e 64 69 | 66 0d 23 65 6e 64 69 66 |;..#endi|f.#endif|
|00002b00| 0d 0d 2f 2a 20 20 53 74 | 61 6e 64 61 72 64 20 43 |../* St|andard C|
|00002b10| 20 68 65 61 64 65 72 73 | 20 2a 2f 0d 23 69 6e 63 | headers| */.#inc|
|00002b20| 6c 75 64 65 20 3c 63 74 | 79 70 65 2e 68 3e 0d 23 |lude <ct|ype.h>.#|
|00002b30| 69 6e 63 6c 75 64 65 20 | 3c 66 6c 6f 61 74 2e 68 |include |<float.h|
|00002b40| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 6c 69 6d 69 |>.#inclu|de <limi|
|00002b50| 74 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ts.h>.#i|nclude <|
|00002b60| 73 74 72 69 6e 67 2e 68 | 3e 0d 23 69 6e 63 6c 75 |string.h|>.#inclu|
|00002b70| 64 65 20 3c 74 69 6d 65 | 2e 68 3e 0d 0d 2f 2a 20 |de <time|.h>../* |
|00002b80| 20 4d 61 63 69 6e 74 6f | 73 68 20 68 65 61 64 65 | Macinto|sh heade|
|00002b90| 72 73 20 2a 2f 0d 2f 2a | 0d 54 68 65 20 69 6e 63 |rs */./*|.The inc|
|00002ba0| 6c 75 73 69 6f 6e 2c 20 | 61 62 6f 76 65 2c 20 6f |lusion, |above, o|
|00002bb0| 66 20 51 75 69 63 6b 64 | 72 61 77 2e 68 20 77 69 |f Quickd|raw.h wi|
|00002bc0| 6c 6c 20 72 65 73 75 6c | 74 20 69 6e 20 74 68 65 |ll resul|t in the|
|00002bd0| 20 69 6e 63 6c 75 73 69 | 6f 6e 20 6f 66 20 4d 69 | inclusi|on of Mi|
|00002be0| 78 65 64 4d 6f 64 65 2e | 68 0d 6f 6e 6c 79 20 69 |xedMode.|h.only i|
|00002bf0| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 61 6c 20 |f the Un|iversal |
|00002c00| 48 65 61 64 65 72 73 20 | 61 72 65 20 75 73 65 64 |Headers |are used|
|00002c10| 2c 20 73 69 6e 63 65 20 | 74 68 65 20 55 6e 69 76 |, since |the Univ|
|00002c20| 65 72 73 61 6c 20 48 65 | 61 64 65 72 73 20 61 6e |ersal He|aders an|
|00002c30| 64 20 74 68 65 20 4d 69 | 78 65 64 0d 4d 6f 64 65 |d the Mi|xed.Mode|
|00002c40| 20 4d 61 6e 61 67 65 72 | 20 61 72 65 20 62 6f 74 | Manager| are bot|
|00002c50| 68 20 6e 65 77 2c 20 70 | 72 6f 76 69 64 69 6e 67 |h new, p|roviding|
|00002c60| 20 75 6e 69 76 65 72 73 | 61 6c 20 73 75 70 70 6f | univers|al suppo|
|00002c70| 72 74 20 66 6f 72 20 36 | 38 6b 20 61 6e 64 20 70 |rt for 6|8k and p|
|00002c80| 70 63 20 4d 61 63 73 2e | 0d 2a 2f 0d 23 69 66 20 |pc Macs.|.*/.#if |
|00002c90| 64 65 66 69 6e 65 64 28 | 5f 5f 4d 49 58 45 44 4d |defined(|__MIXEDM|
|00002ca0| 4f 44 45 5f 5f 29 0d 09 | 23 69 66 20 64 65 66 69 |ODE__)..|#if defi|
|00002cb0| 6e 65 64 28 47 45 4e 45 | 52 41 54 49 4e 47 50 4f |ned(GENE|RATINGPO|
|00002cc0| 57 45 52 50 43 29 20 7c | 7c 20 64 65 66 69 6e 65 |WERPC) ||| define|
|00002cd0| 64 28 47 45 4e 45 52 41 | 54 49 4e 47 36 38 4b 29 |d(GENERA|TING68K)|
|00002ce0| 0d 09 09 23 64 65 66 69 | 6e 65 20 55 4e 49 56 45 |...#defi|ne UNIVE|
|00002cf0| 52 53 41 4c 5f 48 45 41 | 44 45 52 53 20 32 09 2f |RSAL_HEA|DERS 2./|
|00002d00| 2a 20 76 65 72 73 69 6f | 6e 20 32 20 2a 2f 0d 09 |* versio|n 2 */..|
|00002d10| 23 65 6c 73 65 0d 09 09 | 23 64 65 66 69 6e 65 20 |#else...|#define |
|00002d20| 55 4e 49 56 45 52 53 41 | 4c 5f 48 45 41 44 45 52 |UNIVERSA|L_HEADER|
|00002d30| 53 20 31 09 2f 2a 20 76 | 65 72 73 69 6f 6e 20 31 |S 1./* v|ersion 1|
|00002d40| 20 2a 2f 0d 09 23 65 6e | 64 69 66 0d 23 65 6c 73 | */..#en|dif.#els|
|00002d50| 65 0d 09 23 64 65 66 69 | 6e 65 20 55 4e 49 56 45 |e..#defi|ne UNIVE|
|00002d60| 52 53 41 4c 5f 48 45 41 | 44 45 52 53 20 30 0d 23 |RSAL_HEA|DERS 0.#|
|00002d70| 65 6e 64 69 66 0d 23 69 | 66 20 4d 41 43 5f 43 0d |endif.#i|f MAC_C.|
|00002d80| 09 23 69 66 20 54 48 49 | 4e 4b 5f 43 0d 09 09 23 |.#if THI|NK_C...#|
|00002d90| 69 6e 63 6c 75 64 65 20 | 3c 63 6f 6e 73 6f 6c 65 |include |<console|
|00002da0| 2e 68 3e 0d 09 23 65 6e | 64 69 66 0d 09 23 69 6e |.h>..#en|dif..#in|
|00002db0| 63 6c 75 64 65 20 3c 44 | 65 76 69 63 65 73 2e 68 |clude <D|evices.h|
|00002dc0| 3e 0d 09 23 69 6e 63 6c | 75 64 65 20 3c 45 72 72 |>..#incl|ude <Err|
|00002dd0| 6f 72 73 2e 68 3e 0d 09 | 23 69 6e 63 6c 75 64 65 |ors.h>..|#include|
|00002de0| 20 3c 45 76 65 6e 74 73 | 2e 68 3e 0d 09 23 69 6e | <Events|.h>..#in|
|00002df0| 63 6c 75 64 65 20 3c 46 | 69 78 4d 61 74 68 2e 68 |clude <F|ixMath.h|
|00002e00| 3e 09 2f 2a 20 20 4d 75 | 73 74 20 63 6f 6d 65 20 |>./* Mu|st come |
|00002e10| 62 65 66 6f 72 65 20 6d | 63 36 38 38 38 31 2e 68 |before m|c68881.h|
|00002e20| 20 2a 2f 0d 09 23 69 6e | 63 6c 75 64 65 20 3c 46 | */..#in|clude <F|
|00002e30| 6f 6e 74 73 2e 68 3e 0d | 09 23 69 6e 63 6c 75 64 |onts.h>.|.#includ|
|00002e40| 65 20 3c 47 65 73 74 61 | 6c 74 45 71 75 2e 68 3e |e <Gesta|ltEqu.h>|
|00002e50| 0d 09 23 69 6e 63 6c 75 | 64 65 20 3c 4d 65 6d 6f |..#inclu|de <Memo|
|00002e60| 72 79 2e 68 3e 0d 09 23 | 69 6e 63 6c 75 64 65 20 |ry.h>..#|include |
|00002e70| 3c 4f 53 45 76 65 6e 74 | 73 2e 68 3e 0d 09 23 69 |<OSEvent|s.h>..#i|
|00002e80| 6e 63 6c 75 64 65 20 3c | 4f 53 55 74 69 6c 73 2e |nclude <|OSUtils.|
|00002e90| 68 3e 09 2f 2a 20 20 72 | 65 71 75 69 72 65 64 20 |h>./* r|equired |
|00002ea0| 2a 2f 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 50 61 |*/..#inc|lude <Pa|
|00002eb0| 63 6b 61 67 65 73 2e 68 | 3e 0d 09 23 69 6e 63 6c |ckages.h|>..#incl|
|00002ec0| 75 64 65 20 3c 50 61 6c | 65 74 74 65 73 2e 68 3e |ude <Pal|ettes.h>|
|00002ed0| 0d 09 23 69 66 20 54 48 | 49 4e 4b 5f 43 0d 09 09 |..#if TH|INK_C...|
|00002ee0| 23 69 6e 63 6c 75 64 65 | 20 3c 70 72 6f 66 69 6c |#include| <profil|
|00002ef0| 65 2e 68 3e 2f 2a 20 6f | 6e 6c 79 20 6e 65 65 64 |e.h>/* o|nly need|
|00002f00| 65 64 20 69 66 20 79 6f | 75 20 77 61 6e 74 20 74 |ed if yo|u want t|
|00002f10| 69 6d 69 6e 67 20 69 6e | 66 6f 20 2a 2f 0d 09 23 |iming in|fo */..#|
|00002f20| 65 6e 64 69 66 0d 09 23 | 69 6e 63 6c 75 64 65 20 |endif..#|include |
|00002f30| 3c 51 44 4f 66 66 73 63 | 72 65 65 6e 2e 68 3e 0d |<QDOffsc|reen.h>.|
|00002f40| 09 23 69 6e 63 6c 75 64 | 65 20 3c 52 65 73 6f 75 |.#includ|e <Resou|
|00002f50| 72 63 65 73 2e 68 3e 0d | 09 23 69 6e 63 6c 75 64 |rces.h>.|.#includ|
|00002f60| 65 20 3c 52 65 74 72 61 | 63 65 2e 68 3e 09 2f 2a |e <Retra|ce.h>./*|
|00002f70| 20 20 72 65 71 75 69 72 | 65 64 20 2a 2f 0d 09 23 | requir|ed */..#|
|00002f80| 69 6e 63 6c 75 64 65 20 | 3c 53 6c 6f 74 73 2e 68 |include |<Slots.h|
|00002f90| 3e 0d 09 23 69 6e 63 6c | 75 64 65 20 3c 53 6f 75 |>..#incl|ude <Sou|
|00002fa0| 6e 64 2e 68 3e 0d 09 23 | 69 66 20 21 64 65 66 69 |nd.h>..#|if !defi|
|00002fb0| 6e 65 64 28 54 48 49 4e | 4b 5f 43 29 20 7c 7c 20 |ned(THIN|K_C) || |
|00002fc0| 55 4e 49 56 45 52 53 41 | 4c 5f 48 45 41 44 45 52 |UNIVERSA|L_HEADER|
|00002fd0| 53 0d 09 09 23 69 6e 63 | 6c 75 64 65 20 3c 53 74 |S...#inc|lude <St|
|00002fe0| 72 69 6e 67 73 2e 68 3e | 2f 2a 20 63 32 70 73 74 |rings.h>|/* c2pst|
|00002ff0| 72 28 29 20 61 6e 64 20 | 70 32 63 73 74 72 28 29 |r() and |p2cstr()|
|00003000| 20 2a 2f 0d 09 09 23 64 | 65 66 69 6e 65 20 43 74 | */...#d|efine Ct|
|00003010| 6f 50 73 74 72 20 63 32 | 70 73 74 72 0d 09 09 23 |oPstr c2|pstr...#|
|00003020| 64 65 66 69 6e 65 20 50 | 74 6f 43 73 74 72 20 70 |define P|toCstr p|
|00003030| 32 63 73 74 72 0d 09 23 | 65 6c 73 65 0d 09 09 23 |2cstr..#|else...#|
|00003040| 69 6e 63 6c 75 64 65 20 | 3c 70 61 73 63 61 6c 2e |include |<pascal.|
|00003050| 68 3e 09 2f 2a 20 43 74 | 6f 50 53 74 72 28 29 20 |h>./* Ct|oPStr() |
|00003060| 61 6e 64 20 50 74 6f 43 | 53 74 72 28 29 20 2a 2f |and PtoC|Str() */|
|00003070| 0d 09 09 23 69 66 6e 64 | 65 66 20 63 32 70 73 74 |...#ifnd|ef c2pst|
|00003080| 72 0d 09 09 09 23 64 65 | 66 69 6e 65 20 63 32 70 |r....#de|fine c2p|
|00003090| 73 74 72 28 73 29 20 43 | 74 6f 50 73 74 72 28 73 |str(s) C|toPstr(s|
|000030a0| 29 0d 09 09 09 23 64 65 | 66 69 6e 65 20 70 32 63 |)....#de|fine p2c|
|000030b0| 73 74 72 28 73 29 20 50 | 74 6f 43 73 74 72 28 73 |str(s) P|toCstr(s|
|000030c0| 29 0d 09 09 23 65 6e 64 | 69 66 0d 09 23 65 6e 64 |)...#end|if..#end|
|000030d0| 69 66 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 54 69 |if..#inc|lude <Ti|
|000030e0| 6d 65 72 2e 68 3e 09 09 | 2f 2a 20 20 72 65 71 75 |mer.h>..|/* requ|
|000030f0| 69 72 65 64 20 2a 2f 0d | 09 23 69 6e 63 6c 75 64 |ired */.|.#includ|
|00003100| 65 20 3c 54 6f 6f 6c 55 | 74 69 6c 73 2e 68 3e 0d |e <ToolU|tils.h>.|
|00003110| 09 23 69 6e 63 6c 75 64 | 65 20 3c 56 69 64 65 6f |.#includ|e <Video|
|00003120| 2e 68 3e 0d 09 23 69 6e | 63 6c 75 64 65 20 3c 57 |.h>..#in|clude <W|
|00003130| 69 6e 64 6f 77 73 2e 68 | 3e 09 2f 2a 20 20 72 65 |indows.h|>./* re|
|00003140| 71 75 69 72 65 64 20 2a | 2f 0d 09 2f 2f 20 4f 6c |quired *|/..// Ol|
|00003150| 64 20 4d 65 6d 6f 72 79 | 2e 68 20 68 65 61 64 65 |d Memory|.h heade|
|00003160| 72 20 66 69 6c 65 73 2c | 20 62 65 66 6f 72 65 20 |r files,| before |
|00003170| 41 70 70 6c 65 27 73 20 | 55 6e 69 76 65 72 73 61 |Apple's |Universa|
|00003180| 6c 20 48 65 61 64 65 72 | 73 2c 20 64 6f 6e 27 74 |l Header|s, don't|
|00003190| 20 64 65 66 69 6e 65 20 | 74 68 65 20 6e 65 77 0d | define |the new.|
|000031a0| 09 2f 2f 20 42 6c 6f 63 | 6b 4d 6f 76 65 44 61 74 |.// Bloc|kMoveDat|
|000031b0| 61 28 29 2c 20 73 6f 20 | 77 65 20 64 6f 20 69 74 |a(), so |we do it|
|000031c0| 20 68 65 72 65 2c 20 74 | 6f 20 72 65 74 61 69 6e | here, t|o retain|
|000031d0| 20 63 6f 6d 70 61 62 69 | 6c 69 74 79 20 77 69 74 | compabi|lity wit|
|000031e0| 68 20 74 68 65 20 6f 6c | 64 20 68 65 61 64 65 72 |h the ol|d header|
|000031f0| 20 66 69 6c 65 73 2e 0d | 09 23 69 66 20 21 55 4e | files..|.#if !UN|
|00003200| 49 56 45 52 53 41 4c 5f | 48 45 41 44 45 52 53 0d |IVERSAL_|HEADERS.|
|00003210| 09 09 23 70 72 61 67 6d | 61 20 70 61 72 61 6d 65 |..#pragm|a parame|
|00003220| 74 65 72 20 42 6c 6f 63 | 6b 4d 6f 76 65 44 61 74 |ter Bloc|kMoveDat|
|00003230| 61 28 5f 5f 41 30 2c 5f | 5f 41 31 2c 5f 5f 44 30 |a(__A0,_|_A1,__D0|
|00003240| 29 0d 09 09 65 78 74 65 | 72 6e 20 70 61 73 63 61 |)...exte|rn pasca|
|00003250| 6c 20 76 6f 69 64 20 42 | 6c 6f 63 6b 4d 6f 76 65 |l void B|lockMove|
|00003260| 44 61 74 61 28 63 6f 6e | 73 74 20 76 6f 69 64 20 |Data(con|st void |
|00003270| 2a 73 72 63 50 74 72 2c | 76 6f 69 64 20 2a 64 65 |*srcPtr,|void *de|
|00003280| 73 74 50 74 72 2c 53 69 | 7a 65 20 62 79 74 65 43 |stPtr,Si|ze byteC|
|00003290| 6f 75 6e 74 29 3d 30 78 | 41 32 32 45 3b 0d 09 23 |ount)=0x|A22E;..#|
|000032a0| 65 6e 64 69 66 0d 23 65 | 6e 64 69 66 0d 0d 2f 2a |endif.#e|ndif../*|
|000032b0| 0d 54 68 69 73 20 72 65 | 64 65 66 69 6e 65 73 20 |.This re|defines |
|000032c0| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 43 20 66 |the stan|dard C f|
|000032d0| 75 6e 63 74 69 6f 6e 73 | 2c 20 6d 61 6c 6c 6f 63 |unctions|, malloc|
|000032e0| 2c 20 65 74 63 2e 20 74 | 6f 20 69 6e 73 74 65 61 |, etc. t|o instea|
|000032f0| 64 20 63 61 6c 6c 20 41 | 70 70 6c 65 27 73 0d 63 |d call A|pple's.c|
|00003300| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 72 6f 75 |orrespon|ding rou|
|00003310| 74 69 6e 65 73 2c 20 65 | 2e 67 2e 20 4e 65 77 50 |tines, e|.g. NewP|
|00003320| 74 72 2e 20 54 68 65 20 | 54 48 49 4e 4b 20 43 20 |tr. The |THINK C |
|00003330| 6d 65 6d 6f 72 79 20 6d | 61 6e 61 67 65 6d 65 6e |memory m|anagemen|
|00003340| 74 20 72 6f 75 74 69 6e | 65 73 20 61 72 65 20 0d |t routin|es are .|
|00003350| 70 6f 6f 72 20 62 65 63 | 61 75 73 65 20 74 68 65 |poor bec|ause the|
|00003360| 79 20 61 72 65 20 62 61 | 64 20 61 62 6f 75 74 20 |y are ba|d about |
|00003370| 66 72 65 65 69 6e 67 20 | 73 70 61 63 65 2c 20 74 |freeing |space, t|
|00003380| 65 6e 64 69 6e 67 20 74 | 6f 20 66 72 61 67 6d 65 |ending t|o fragme|
|00003390| 6e 74 20 74 68 65 20 66 | 72 65 65 20 73 70 61 63 |nt the f|ree spac|
|000033a0| 65 2e 20 0d 2a 2f 0d 23 | 69 66 20 54 48 49 4e 4b |e. .*/.#|if THINK|
|000033b0| 5f 43 0d 09 23 69 6e 63 | 6c 75 64 65 20 22 4d 61 |_C..#inc|lude "Ma|
|000033c0| 63 4d 65 6d 6f 72 79 2e | 68 22 0d 23 65 6e 64 69 |cMemory.|h".#endi|
|000033d0| 66 0d 0d 2f 2a 0d 4d 41 | 54 4c 41 42 20 41 4e 44 |f../*.MA|TLAB AND|
|000033e0| 20 54 48 45 20 4e 45 57 | 4c 49 4e 45 20 43 48 41 | THE NEW|LINE CHA|
|000033f0| 52 41 43 54 45 52 0d 49 | 6e 20 6d 6f 73 74 20 43 |RACTER.I|n most C|
|00003400| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 73 20 74 68 | environ|ments th|
|00003410| 65 20 6e 65 77 6c 69 6e | 65 20 63 68 61 72 61 63 |e newlin|e charac|
|00003420| 74 65 72 20 69 73 20 27 | 5c 6e 27 20 28 61 73 63 |ter is '|\n' (asc|
|00003430| 69 69 20 31 30 29 2e 20 | 49 6e 20 41 70 70 6c 65 |ii 10). |In Apple|
|00003440| 27 73 0d 77 69 73 64 6f | 6d 20 74 68 65 79 20 63 |'s.wisdo|m they c|
|00003450| 68 6f 73 65 20 74 6f 20 | 73 65 70 61 72 61 74 65 |hose to |separate|
|00003460| 20 6c 69 6e 65 73 20 69 | 6e 20 4d 61 63 69 6e 74 | lines i|n Macint|
|00003470| 6f 73 68 20 66 69 6c 65 | 73 20 77 69 74 68 20 74 |osh file|s with t|
|00003480| 68 65 20 61 73 63 69 69 | 20 31 33 0d 63 68 61 72 |he ascii| 13.char|
|00003490| 61 63 74 65 72 2c 20 77 | 68 69 63 68 20 69 73 20 |acter, w|hich is |
|000034a0| 75 73 75 61 6c 6c 79 20 | 63 61 6c 6c 65 64 20 74 |usually |called t|
|000034b0| 68 65 20 72 65 74 75 72 | 6e 20 63 68 61 72 61 63 |he retur|n charac|
|000034c0| 74 65 72 20 27 5c 72 27 | 2e 20 53 74 61 6e 64 61 |ter '\r'|. Standa|
|000034d0| 72 64 20 43 0d 73 70 65 | 63 69 66 69 65 73 20 74 |rd C.spe|cifies t|
|000034e0| 68 61 74 20 74 68 65 20 | 73 74 64 69 6f 20 6c 69 |hat the |stdio li|
|000034f0| 62 72 61 72 79 20 77 69 | 6c 6c 20 75 73 65 20 27 |brary wi|ll use '|
|00003500| 5c 6e 27 20 61 73 20 74 | 68 65 20 6e 65 77 6c 69 |\n' as t|he newli|
|00003510| 6e 65 20 63 68 61 72 61 | 63 74 65 72 2e 20 54 68 |ne chara|cter. Th|
|00003520| 69 73 0d 70 6f 74 65 6e | 74 69 61 6c 6c 79 20 63 |is.poten|tially c|
|00003530| 72 65 61 74 65 73 20 61 | 20 63 6f 6d 70 61 74 69 |reates a| compati|
|00003540| 62 69 6c 69 74 79 20 70 | 72 6f 62 6c 65 6d 20 62 |bility p|roblem b|
|00003550| 65 74 77 65 65 6e 20 4d | 61 63 20 43 20 70 72 6f |etween M|ac C pro|
|00003560| 67 72 61 6d 73 20 61 6e | 64 20 43 0d 70 72 6f 67 |grams an|d C.prog|
|00003570| 72 61 6d 73 20 77 72 69 | 74 74 65 6e 20 66 6f 72 |rams wri|tten for|
|00003580| 20 74 68 65 20 72 65 73 | 74 20 6f 66 20 74 68 65 | the res|t of the|
|00003590| 20 77 6f 72 6c 64 27 73 | 20 63 6f 6d 70 75 74 65 | world's| compute|
|000035a0| 72 73 2c 20 73 69 6e 63 | 65 20 6f 6e 65 20 77 61 |rs, sinc|e one wa|
|000035b0| 6e 74 73 20 61 6e 79 20 | 74 65 78 74 0d 66 69 6c |nts any |text.fil|
|000035c0| 65 73 20 74 68 65 79 20 | 70 72 6f 64 75 63 65 20 |es they |produce |
|000035d0| 74 6f 20 62 65 20 61 70 | 70 72 6f 70 72 69 61 74 |to be ap|propriat|
|000035e0| 65 20 74 6f 20 74 68 65 | 20 6c 6f 63 61 6c 20 65 |e to the| local e|
|000035f0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2e 20 42 6f 74 68 |nvironme|nt. Both|
|00003600| 20 4d 50 57 20 61 6e 64 | 0d 54 48 49 4e 4b 20 43 | MPW and|.THINK C|
|00003610| 20 72 65 73 6f 6c 76 65 | 20 74 68 65 20 70 72 6f | resolve| the pro|
|00003620| 62 6c 65 6d 20 62 65 68 | 69 6e 64 20 74 68 65 20 |blem beh|ind the |
|00003630| 73 63 65 6e 65 73 2c 20 | 62 75 74 20 74 68 65 79 |scenes, |but they|
|00003640| 20 64 6f 20 69 74 20 69 | 6e 20 64 69 66 66 65 72 | do it i|n differ|
|00003650| 65 6e 74 20 77 61 79 73 | 2e 0d 4d 50 57 20 72 65 |ent ways|..MPW re|
|00003660| 64 65 66 69 6e 65 73 20 | 74 68 65 20 61 73 73 6f |defines |the asso|
|00003670| 63 69 61 74 69 6f 6e 20 | 62 65 74 77 65 65 6e 20 |ciation |between |
|00003680| 73 79 6d 62 6f 6c 69 63 | 20 6e 61 6d 65 73 20 61 |symbolic| names a|
|00003690| 6e 64 20 63 68 61 72 61 | 63 74 65 72 20 63 6f 64 |nd chara|cter cod|
|000036a0| 65 73 2c 20 6d 61 6b 69 | 6e 67 0d 27 5c 6e 27 20 |es, maki|ng.'\n' |
|000036b0| 62 65 20 31 33 20 61 6e | 64 20 27 5c 72 27 20 62 |be 13 an|d '\r' b|
|000036c0| 65 20 31 30 2e 20 54 48 | 49 4e 4b 20 43 20 69 6e |e 10. TH|INK C in|
|000036d0| 73 74 65 61 64 20 6d 6f | 64 69 66 69 65 73 20 74 |stead mo|difies t|
|000036e0| 68 65 20 73 74 64 69 6f | 20 6c 69 62 72 61 72 79 |he stdio| library|
|000036f0| 20 73 6f 20 74 68 61 74 | 0d 72 65 61 64 73 20 61 | so that|.reads a|
|00003700| 6e 64 20 77 72 69 74 65 | 73 20 74 6f 20 61 20 22 |nd write|s to a "|
|00003710| 74 65 78 74 22 20 28 69 | 2e 65 2e 20 6e 6f 74 20 |text" (i|.e. not |
|00003720| 62 69 6e 61 72 79 29 20 | 73 74 72 65 61 6d 20 61 |binary) |stream a|
|00003730| 72 65 20 74 72 61 6e 73 | 6c 61 74 65 64 2c 20 65 |re trans|lated, e|
|00003740| 78 63 68 61 6e 67 69 6e | 67 0d 63 68 61 72 61 63 |xchangin|g.charac|
|00003750| 74 65 72 20 63 6f 64 65 | 73 20 31 30 20 61 6e 64 |ter code|s 10 and|
|00003760| 20 31 33 2e 20 42 6f 74 | 68 20 73 6f 6c 75 74 69 | 13. Bot|h soluti|
|00003770| 6f 6e 73 20 77 6f 72 6b | 2e 20 48 6f 77 65 76 65 |ons work|. Howeve|
|00003780| 72 2c 20 77 68 65 6e 20 | 77 65 20 75 73 65 20 54 |r, when |we use T|
|00003790| 48 49 4e 4b 20 43 20 74 | 6f 0d 63 72 65 61 74 65 |HINK C t|o.create|
|000037a0| 20 63 6f 64 65 20 72 65 | 73 6f 75 72 63 65 73 20 | code re|sources |
|000037b0| 66 6f 72 20 4d 41 54 4c | 41 42 20 77 65 20 61 72 |for MATL|AB we ar|
|000037c0| 65 20 66 6f 72 63 65 64 | 20 74 6f 20 75 73 65 20 |e forced| to use |
|000037d0| 74 68 65 20 4d 50 57 20 | 73 74 64 69 6f 20 6c 69 |the MPW |stdio li|
|000037e0| 62 72 61 72 79 20 74 68 | 61 74 0d 69 73 20 62 75 |brary th|at.is bu|
|000037f0| 69 6c 74 20 69 6e 74 6f | 20 4d 41 54 4c 41 42 2e |ilt into| MATLAB.|
|00003800| 20 55 6e 66 6f 72 74 75 | 6e 61 74 65 6c 79 20 74 | Unfortu|nately t|
|00003810| 68 69 73 20 62 79 70 61 | 73 73 65 73 20 62 6f 74 |his bypa|sses bot|
|00003820| 68 20 63 6f 6d 70 69 6c | 65 72 73 27 20 66 69 78 |h compil|ers' fix|
|00003830| 65 73 20 74 6f 20 74 68 | 65 0d 6e 65 77 6c 69 6e |es to th|e.newlin|
|00003840| 65 20 70 72 6f 62 6c 65 | 6d 2e 20 54 68 65 20 70 |e proble|m. The p|
|00003850| 72 6f 62 6c 65 6d 20 61 | 66 66 65 63 74 73 20 65 |roblem a|ffects e|
|00003860| 76 65 72 79 20 73 69 6e | 67 6c 65 20 74 65 78 74 |very sin|gle text|
|00003870| 20 69 2f 6f 20 6f 70 65 | 72 61 74 69 6f 6e 2c 20 | i/o ope|ration, |
|00003880| 65 2e 67 2e 20 65 76 65 | 72 79 0d 70 72 69 6e 74 |e.g. eve|ry.print|
|00003890| 66 20 61 6e 64 20 73 63 | 61 6e 66 2e 20 41 6c 61 |f and sc|anf. Ala|
|000038a0| 73 2c 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 77 |s, there| is no w|
|000038b0| 61 79 20 74 6f 20 67 65 | 74 20 74 68 65 20 70 72 |ay to ge|t the pr|
|000038c0| 65 2d 70 72 6f 63 65 73 | 73 6f 72 20 74 6f 20 72 |e-proces|sor to r|
|000038d0| 65 64 65 66 69 6e 65 20 | 2f 6e 0d 61 6e 64 20 2f |edefine |/n.and /|
|000038e0| 72 2e 0d 0d 57 65 20 68 | 61 76 65 20 61 74 74 65 |r...We h|ave atte|
|000038f0| 6d 70 74 65 64 20 74 77 | 6f 20 73 6f 6c 75 74 69 |mpted tw|o soluti|
|00003900| 6f 6e 73 3a 20 61 20 71 | 75 69 63 6b 20 66 69 78 |ons: a q|uick fix|
|00003910| 2c 20 75 73 69 6e 67 20 | 6d 61 63 72 6f 73 20 4e |, using |macros N|
|00003920| 4c 20 61 6e 64 20 4e 45 | 57 4c 49 4e 45 2c 20 61 |L and NE|WLINE, a|
|00003930| 6e 64 20 61 0d 63 6f 6d | 70 6c 65 74 65 20 63 6c |nd a.com|plete cl|
|00003940| 65 61 6e 20 66 69 78 2c | 20 75 73 69 6e 67 20 54 |ean fix,| using T|
|00003950| 72 61 6e 73 6c 61 74 65 | 4c 69 6e 65 66 65 65 64 |ranslate|Linefeed|
|00003960| 73 2e 63 2e 20 41 74 20 | 70 72 65 73 65 6e 74 20 |s.c. At |present |
|00003970| 6f 6e 6c 79 20 74 68 65 | 20 71 75 69 63 6b 20 66 |only the| quick f|
|00003980| 69 78 0d 77 6f 72 6b 73 | 2e 0d 0d 4f 75 72 20 71 |ix.works|...Our q|
|00003990| 75 69 63 6b 20 66 69 78 | 20 69 73 20 74 6f 20 63 |uick fix| is to c|
|000039a0| 72 65 61 74 65 20 61 20 | 6d 61 63 72 6f 20 63 61 |reate a |macro ca|
|000039b0| 6c 6c 65 64 20 4e 4c 20 | 74 68 61 74 20 69 73 20 |lled NL |that is |
|000039c0| 6e 6f 72 6d 61 6c 6c 79 | 20 64 65 66 69 6e 65 64 |normally| defined|
|000039d0| 20 61 73 20 74 68 65 0d | 6e 65 77 6c 69 6e 65 20 | as the.|newline |
|000039e0| 73 74 72 69 6e 67 20 22 | 5c 6e 22 2c 20 62 75 74 |string "|\n", but|
|000039f0| 20 77 68 69 63 68 20 69 | 73 20 69 6e 73 74 65 61 | which i|s instea|
|00003a00| 64 20 64 65 66 69 6e 65 | 64 20 61 73 20 22 5c 30 |d define|d as "\0|
|00003a10| 31 35 22 20 28 69 2e 65 | 2e 20 61 73 63 69 69 20 |15" (i.e|. ascii |
|00003a20| 31 33 29 20 77 68 65 6e | 0d 4d 41 54 4c 41 42 20 |13) when|.MATLAB |
|00003a30| 69 73 20 74 72 75 65 2e | 20 50 72 6f 67 72 61 6d |is true.| Program|
|00003a40| 73 20 73 75 63 68 20 61 | 73 20 41 73 73 69 67 6e |s such a|s Assign|
|00003a50| 2e 63 20 74 68 61 74 20 | 68 61 76 65 20 72 65 70 |.c that |have rep|
|00003a60| 6c 61 63 65 64 20 61 6c | 6c 20 69 6e 73 74 61 6e |laced al|l instan|
|00003a70| 63 65 73 20 6f 66 0d 22 | 5c 6e 22 20 62 79 20 4e |ces of."|\n" by N|
|00003a80| 4c 20 77 69 6c 6c 20 74 | 68 65 6e 20 77 6f 72 6b |L will t|hen work|
|00003a90| 20 77 68 65 74 68 65 72 | 20 6f 72 20 6e 6f 74 20 | whether| or not |
|00003aa0| 4d 41 54 4c 41 42 20 69 | 73 20 74 72 75 65 2e 20 |MATLAB i|s true. |
|00003ab0| 54 68 65 20 6f 62 76 69 | 6f 75 73 20 64 72 61 77 |The obvi|ous draw|
|00003ac0| 62 61 63 6b 20 69 73 0d | 74 68 61 74 20 74 68 69 |back is.|that thi|
|00003ad0| 73 20 71 75 69 63 6b 20 | 73 6f 6c 75 74 69 6f 6e |s quick |solution|
|00003ae0| 20 72 65 71 75 69 72 65 | 73 20 74 68 65 73 65 20 | require|s these |
|00003af0| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 73 20 74 6f |modifica|tions to|
|00003b00| 20 74 68 65 20 73 6f 75 | 72 63 65 20 66 69 6c 65 | the sou|rce file|
|00003b10| 73 2e 0d 0d 54 68 65 20 | 63 6c 65 61 6e 20 72 65 |s...The |clean re|
|00003b20| 6c 61 74 69 76 65 6c 79 | 20 63 6f 6d 70 6c 65 74 |latively| complet|
|00003b30| 65 20 73 6f 6c 75 74 69 | 6f 6e 20 69 73 20 74 6f |e soluti|on is to|
|00003b40| 20 69 6e 73 65 72 74 20 | 61 20 66 69 6c 74 65 72 | insert |a filter|
|00003b50| 2c 0d 54 72 61 6e 73 6c | 61 74 65 4c 69 6e 65 66 |,.Transl|ateLinef|
|00003b60| 65 65 64 73 2e 63 2c 20 | 74 68 61 74 20 69 6e 74 |eeds.c, |that int|
|00003b70| 65 72 63 65 70 74 73 20 | 74 68 65 20 63 61 6c 6c |ercepts |the call|
|00003b80| 73 20 74 6f 20 74 68 65 | 20 73 74 64 69 6f 20 6c |s to the| stdio l|
|00003b90| 69 62 72 61 72 79 20 61 | 6e 64 0d 74 72 61 6e 73 |ibrary a|nd.trans|
|00003ba0| 6c 61 74 65 73 20 2f 72 | 20 74 6f 20 2f 6e 20 61 |lates /r| to /n a|
|00003bb0| 6e 64 20 76 69 63 65 20 | 76 65 72 73 61 20 66 6f |nd vice |versa fo|
|00003bc0| 72 20 69 2f 6f 20 74 6f | 20 74 65 78 74 20 66 69 |r i/o to| text fi|
|00003bd0| 6c 65 73 2e 20 54 68 65 | 20 68 65 61 64 65 72 20 |les. The| header |
|00003be0| 66 69 6c 65 0d 54 72 61 | 6e 73 6c 61 74 65 4c 69 |file.Tra|nslateLi|
|00003bf0| 6e 65 66 65 65 64 73 2e | 68 20 72 65 64 65 66 69 |nefeeds.|h redefi|
|00003c00| 6e 65 73 20 61 6c 6c 20 | 74 68 65 20 73 74 64 69 |nes all |the stdi|
|00003c10| 6f 20 63 61 6c 6c 73 20 | 61 73 20 6d 61 63 72 6f |o calls |as macro|
|00003c20| 73 20 74 68 61 74 20 63 | 61 6c 6c 0d 63 6f 72 72 |s that c|all.corr|
|00003c30| 65 73 70 6f 6e 64 69 6e | 67 20 72 6f 75 74 69 6e |espondin|g routin|
|00003c40| 65 73 20 77 69 74 68 69 | 6e 20 54 72 61 6e 73 6c |es withi|n Transl|
|00003c50| 61 74 65 4c 69 6e 65 66 | 65 65 64 73 2e 63 2e 20 |ateLinef|eeds.c. |
|00003c60| 4e 6f 74 65 20 74 68 61 | 74 20 73 63 61 6e 66 20 |Note tha|t scanf |
|00003c70| 69 73 20 6e 6f 74 0d 69 | 6e 74 65 72 63 65 70 74 |is not.i|ntercept|
|00003c80| 65 64 20 61 6e 64 20 74 | 68 61 74 20 66 6f 72 20 |ed and t|hat for |
|00003c90| 70 72 69 6e 74 66 20 28 | 61 6e 64 20 66 70 72 69 |printf (|and fpri|
|00003ca0| 6e 74 66 2c 20 2e 2e 2e | 29 20 6f 6e 6c 79 20 74 |ntf, ...|) only t|
|00003cb0| 68 65 20 66 6f 72 6d 61 | 74 20 73 74 72 69 6e 67 |he forma|t string|
|00003cc0| 0d 69 73 20 74 72 61 6e | 73 6c 61 74 65 64 3b 20 |.is tran|slated; |
|00003cd0| 6c 69 6e 65 66 65 65 64 | 73 20 68 69 64 69 6e 67 |linefeed|s hiding|
|00003ce0| 20 69 6e 20 63 68 61 72 | 20 6f 72 20 73 74 72 69 | in char| or stri|
|00003cf0| 6e 67 20 61 72 67 75 6d | 65 6e 74 73 20 69 6e 20 |ng argum|ents in |
|00003d00| 74 68 65 20 76 61 72 69 | 61 62 6c 65 0d 70 61 72 |the vari|able.par|
|00003d10| 74 20 6f 66 20 74 68 65 | 20 61 72 67 75 6d 65 6e |t of the| argumen|
|00003d20| 74 20 6c 69 73 74 20 61 | 72 65 20 6e 6f 74 20 62 |t list a|re not b|
|00003d30| 65 20 74 72 61 6e 73 6c | 61 74 65 64 2e 0d 2a 2f |e transl|ated..*/|
|00003d40| 0d 23 69 66 20 4d 41 54 | 4c 41 42 20 26 26 20 54 |.#if MAT|LAB && T|
|00003d50| 48 49 4e 4b 5f 43 09 09 | 09 2f 2a 20 43 6c 65 61 |HINK_C..|./* Clea|
|00003d60| 6e 2c 20 72 65 6c 61 74 | 69 76 65 6c 79 20 63 6f |n, relat|ively co|
|00003d70| 6d 70 6c 65 74 65 20 73 | 6f 6c 75 74 69 6f 6e 20 |mplete s|olution |
|00003d80| 2a 2f 0d 09 2f 2f 23 69 | 6e 63 6c 75 64 65 20 3c |*/..//#i|nclude <|
|00003d90| 54 72 61 6e 73 6c 61 74 | 65 4c 69 6e 65 66 65 65 |Translat|eLinefee|
|00003da0| 64 73 2e 68 3e 0d 23 65 | 6e 64 69 66 0d 23 69 66 |ds.h>.#e|ndif.#if|
|00003db0| 20 21 64 65 66 69 6e 65 | 64 28 5f 54 72 61 6e 73 | !define|d(_Trans|
|00003dc0| 6c 61 74 65 4c 69 6e 65 | 66 65 65 64 73 5f 29 20 |lateLine|feeds_) |
|00003dd0| 26 26 20 4d 41 54 4c 41 | 42 20 26 26 20 54 48 49 |&& MATLA|B && THI|
|00003de0| 4e 4b 5f 43 09 2f 2a 20 | 51 75 69 63 6b 20 66 69 |NK_C./* |Quick fi|
|00003df0| 78 20 2a 2f 0d 09 23 64 | 65 66 69 6e 65 20 4e 4c |x */..#d|efine NL|
|00003e00| 20 22 5c 72 22 0d 09 23 | 64 65 66 69 6e 65 20 4e | "\r"..#|define N|
|00003e10| 45 57 4c 49 4e 45 20 27 | 5c 72 27 0d 23 65 6c 73 |EWLINE '|\r'.#els|
|00003e20| 65 0d 09 23 64 65 66 69 | 6e 65 20 4e 4c 20 22 5c |e..#defi|ne NL "\|
|00003e30| 6e 22 09 09 2f 2a 20 74 | 68 65 20 73 74 61 6e 64 |n"../* t|he stand|
|00003e40| 61 72 64 20 6e 65 77 2d | 6c 69 6e 65 20 73 74 72 |ard new-|line str|
|00003e50| 69 6e 67 20 2a 2f 0d 09 | 23 64 65 66 69 6e 65 20 |ing */..|#define |
|00003e60| 4e 45 57 4c 49 4e 45 20 | 27 5c 6e 27 0d 23 65 6e |NEWLINE |'\n'.#en|
|00003e70| 64 69 66 0d 0d 2f 2a 0d | 54 52 55 45 20 61 6e 64 |dif../*.|TRUE and|
|00003e80| 20 46 41 4c 53 45 0d 2a | 2f 0d 23 69 66 6e 64 65 | FALSE.*|/.#ifnde|
|00003e90| 66 20 54 52 55 45 0d 09 | 23 64 65 66 69 6e 65 20 |f TRUE..|#define |
|00003ea0| 46 41 4c 53 45 09 30 0d | 09 23 64 65 66 69 6e 65 |FALSE.0.|.#define|
|00003eb0| 20 54 52 55 45 09 31 0d | 23 65 6e 64 69 66 0d 0d | TRUE.1.|#endif..|
|00003ec0| 2f 2a 0d 4e 41 4e 20 26 | 20 49 4e 46 0d 49 66 20 |/*.NAN &| INF.If |
|00003ed0| 79 6f 75 27 72 65 20 75 | 73 69 6e 67 20 4e 41 4e |you're u|sing NAN|
|00003ee0| 20 61 6e 64 20 49 4e 46 | 20 79 6f 75 27 6c 6c 20 | and INF| you'll |
|00003ef0| 62 65 20 69 6e 74 65 72 | 65 73 74 65 64 20 69 6e |be inter|ested in|
|00003f00| 20 74 68 65 20 49 73 4e | 61 6e 28 29 2c 20 49 73 | the IsN|an(), Is|
|00003f10| 49 6e 66 28 29 2c 20 61 | 6e 64 0d 49 73 46 69 6e |Inf(), a|nd.IsFin|
|00003f20| 69 74 65 28 29 20 64 65 | 66 69 6e 69 74 69 6f 6e |ite() de|finition|
|00003f30| 73 20 26 20 70 72 6f 74 | 6f 74 79 70 65 73 20 62 |s & prot|otypes b|
|00003f40| 65 6c 6f 77 2e 20 57 68 | 65 6e 20 63 6f 6d 70 69 |elow. Wh|en compi|
|00003f50| 6c 69 6e 67 20 66 6f 72 | 20 61 20 50 6f 77 65 72 |ling for| a Power|
|00003f60| 50 43 2c 20 0d 6d 61 74 | 68 2e 68 20 69 6e 63 6c |PC, .mat|h.h incl|
|00003f70| 75 64 65 73 20 74 68 65 | 20 66 70 2e 68 20 68 65 |udes the| fp.h he|
|00003f80| 61 64 65 72 2c 20 77 68 | 69 63 68 20 64 65 66 69 |ader, wh|ich defi|
|00003f90| 6e 65 73 20 49 4e 46 49 | 4e 49 54 59 20 61 6e 64 |nes INFI|NITY and|
|00003fa0| 20 4e 41 4e 2e 0d 2a 2f | 0d 23 69 66 20 21 64 65 | NAN..*/|.#if !de|
|00003fb0| 66 69 6e 65 64 28 49 4e | 46 29 0d 09 23 64 65 66 |fined(IN|F)..#def|
|00003fc0| 69 6e 65 20 49 4e 46 20 | 48 55 47 45 5f 56 41 4c |ine INF |HUGE_VAL|
|00003fd0| 09 2f 2a 20 64 65 66 69 | 6e 65 64 20 69 6e 20 6d |./* defi|ned in m|
|00003fe0| 61 74 68 2e 68 20 2a 2f | 0d 23 65 6e 64 69 66 0d |ath.h */|.#endif.|
|00003ff0| 23 69 66 20 21 64 65 66 | 69 6e 65 64 28 4e 41 4e |#if !def|ined(NAN|
|00004000| 29 20 26 26 20 21 64 65 | 66 69 6e 65 64 28 70 6f |) && !de|fined(po|
|00004010| 77 65 72 63 29 0d 2f 2f | 09 23 64 65 66 69 6e 65 |werc).//|.#define|
|00004020| 20 4e 41 4e 09 28 30 2e | 30 2f 30 2e 30 29 09 2f | NAN.(0.|0/0.0)./|
|00004030| 2a 20 65 76 61 6c 75 61 | 74 65 64 20 61 74 20 72 |* evalua|ted at r|
|00004040| 75 6e 74 69 6d 65 20 2a | 2f 0d 09 23 64 65 66 69 |untime *|/..#defi|
|00004050| 6e 65 20 4e 41 4e 09 4e | 61 6e 09 09 09 2f 2a 20 |ne NAN.N|an.../* |
|00004060| 67 6c 6f 62 61 6c 20 64 | 65 66 69 6e 65 64 20 69 |global d|efined i|
|00004070| 6e 20 4e 61 6e 2e 63 20 | 2a 2f 0d 23 65 6e 64 69 |n Nan.c |*/.#endi|
|00004080| 66 0d 0d 2f 2a 0d 4e 55 | 4d 45 52 49 43 41 4c 20 |f../*.NU|MERICAL |
|00004090| 43 4f 4e 53 54 41 4e 54 | 53 0d 49 74 27 73 20 73 |CONSTANT|S.It's s|
|000040a0| 61 64 20 74 6f 20 73 61 | 79 2c 20 62 75 74 20 54 |ad to sa|y, but T|
|000040b0| 48 49 4e 4b 20 43 20 35 | 2e 30 32 20 6c 6f 73 65 |HINK C 5|.02 lose|
|000040c0| 73 20 74 77 6f 20 62 69 | 74 73 20 6f 66 20 70 72 |s two bi|ts of pr|
|000040d0| 65 63 69 73 69 6f 6e 20 | 63 6f 6e 76 65 72 74 69 |ecision |converti|
|000040e0| 6e 67 20 62 65 74 77 65 | 65 6e 0d 64 6f 75 62 6c |ng betwe|en.doubl|
|000040f0| 65 73 20 61 6e 64 20 61 | 73 63 69 69 20 74 65 78 |es and a|scii tex|
|00004100| 74 2c 20 69 6e 20 65 69 | 74 68 65 72 20 64 69 72 |t, in ei|ther dir|
|00004110| 65 63 74 69 6f 6e 2e 20 | 54 68 75 73 20 79 6f 75 |ection. |Thus you|
|00004120| 20 77 69 6c 6c 20 6f 62 | 74 61 69 6e 20 6d 6f 72 | will ob|tain mor|
|00004130| 65 20 61 63 63 75 72 61 | 74 65 0d 72 65 73 75 6c |e accura|te.resul|
|00004140| 74 73 20 62 79 20 63 6f | 6d 70 75 74 69 6e 67 20 |ts by co|mputing |
|00004150| 74 68 65 20 6e 75 6d 65 | 72 69 63 61 6c 20 63 6f |the nume|rical co|
|00004160| 6e 73 74 61 6e 74 73 20 | 62 65 6c 6f 77 20 61 74 |nstants |below at|
|00004170| 20 72 75 6e 74 69 6d 65 | 20 72 61 74 68 65 72 20 | runtime| rather |
|00004180| 74 68 61 6e 20 75 73 69 | 6e 67 0d 74 68 65 73 65 |than usi|ng.these|
|00004190| 20 70 72 65 64 65 66 69 | 6e 65 64 20 63 6f 6e 73 | predefi|ned cons|
|000041a0| 74 61 6e 74 73 2e 20 54 | 68 65 20 41 4e 53 49 20 |tants. T|he ANSI |
|000041b0| 4e 75 6d 65 72 69 63 61 | 6c 20 43 20 45 78 74 65 |Numerica|l C Exte|
|000041c0| 6e 73 69 6f 6e 73 20 67 | 72 6f 75 70 20 69 73 20 |nsions g|roup is |
|000041d0| 6d 6f 76 69 6e 67 20 74 | 6f 0d 72 65 71 75 69 72 |moving t|o.requir|
|000041e0| 65 20 43 20 63 6f 6d 70 | 69 6c 65 72 73 20 74 6f |e C comp|ilers to|
|000041f0| 20 70 72 65 73 65 72 76 | 65 20 70 72 65 63 69 73 | preserv|e precis|
|00004200| 69 6f 6e 2c 20 73 6f 20 | 74 68 65 72 65 20 69 73 |ion, so |there is|
|00004210| 20 68 6f 70 65 20 66 6f | 72 20 74 68 65 20 66 75 | hope fo|r the fu|
|00004220| 74 75 72 65 2e 20 4f 66 | 0d 63 6f 75 72 73 65 20 |ture. Of|.course |
|00004230| 6d 6f 73 74 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |most app|lication|
|00004240| 73 20 77 6f 75 6c 64 20 | 6e 65 76 65 72 20 6e 6f |s would |never no|
|00004250| 74 69 63 65 20 61 20 6c | 6f 73 73 20 6f 66 20 74 |tice a l|oss of t|
|00004260| 77 6f 20 62 69 74 73 20 | 70 72 65 63 69 73 69 6f |wo bits |precisio|
|00004270| 6e 20 6f 75 74 20 6f 66 | 0d 74 68 65 20 74 6f 74 |n out of|.the tot|
|00004280| 61 6c 20 64 6f 75 62 6c | 65 20 70 72 65 63 69 73 |al doubl|e precis|
|00004290| 69 6f 6e 20 67 69 76 65 | 6e 20 62 79 20 74 68 65 |ion give|n by the|
|000042a0| 20 36 34 20 62 69 74 73 | 20 69 6e 20 74 68 65 20 | 64 bits| in the |
|000042b0| 6d 61 6e 74 69 73 73 61 | 2e 0d 2a 2f 0d 23 69 66 |mantissa|..*/.#if|
|000042c0| 20 21 64 65 66 69 6e 65 | 64 28 50 49 29 0d 09 23 | !define|d(PI)..#|
|000042d0| 64 65 66 69 6e 65 20 50 | 49 09 09 33 2e 31 34 31 |define P|I..3.141|
|000042e0| 35 39 32 36 35 33 35 38 | 39 37 39 33 32 33 38 35 |59265358|97932385|
|000042f0| 09 2f 2a 20 63 6f 6d 70 | 75 74 65 64 20 69 6e 20 |./* comp|uted in |
|00004300| 4d 61 74 68 65 6d 61 74 | 69 63 61 20 2a 2f 0d 23 |Mathemat|ica */.#|
|00004310| 65 6e 64 69 66 0d 23 69 | 66 20 21 64 65 66 69 6e |endif.#i|f !defin|
|00004320| 65 64 28 4c 4f 47 50 49 | 29 0d 09 23 64 65 66 69 |ed(LOGPI|)..#defi|
|00004330| 6e 65 20 4c 4f 47 50 49 | 09 31 2e 31 34 34 37 32 |ne LOGPI|.1.14472|
|00004340| 39 38 38 35 38 34 39 34 | 30 30 31 37 34 31 34 09 |98858494|0017414.|
|00004350| 2f 2a 20 63 6f 6d 70 75 | 74 65 64 20 69 6e 20 4d |/* compu|ted in M|
|00004360| 61 74 68 65 6d 61 74 69 | 63 61 20 2a 2f 0d 23 65 |athemati|ca */.#e|
|00004370| 6e 64 69 66 0d 23 69 66 | 20 21 64 65 66 69 6e 65 |ndif.#if| !define|
|00004380| 64 28 4c 4f 47 32 29 0d | 09 23 64 65 66 69 6e 65 |d(LOG2).|.#define|
|00004390| 20 4c 4f 47 32 09 30 2e | 36 39 33 31 34 37 31 38 | LOG2.0.|69314718|
|000043a0| 30 35 35 39 39 34 35 33 | 30 39 34 32 09 2f 2a 20 |05599453|0942./* |
|000043b0| 63 6f 6d 70 75 74 65 64 | 20 69 6e 20 4d 61 74 68 |computed| in Math|
|000043c0| 65 6d 61 74 69 63 61 20 | 2a 2f 0d 23 65 6e 64 69 |ematica |*/.#endi|
|000043d0| 66 0d 23 69 66 20 21 64 | 65 66 69 6e 65 64 28 4c |f.#if !d|efined(L|
|000043e0| 4f 47 31 30 29 0d 09 23 | 64 65 66 69 6e 65 20 4c |OG10)..#|define L|
|000043f0| 4f 47 31 30 09 32 2e 33 | 30 32 35 38 35 30 39 32 |OG10.2.3|02585092|
|00004400| 39 39 34 30 34 35 36 38 | 34 30 32 09 2f 2a 20 63 |99404568|402./* c|
|00004410| 6f 6d 70 75 74 65 64 20 | 69 6e 20 4d 61 74 68 65 |omputed |in Mathe|
|00004420| 6d 61 74 69 63 61 20 2a | 2f 0d 23 65 6e 64 69 66 |matica *|/.#endif|
|00004430| 0d 0d 23 69 66 20 4d 41 | 43 5f 43 0d 09 2f 2a 0d |..#if MA|C_C../*.|
|00004440| 09 43 4c 55 54 53 49 5a | 45 0d 09 49 6e 6c 69 6e |.CLUTSIZ|E..Inlin|
|00004450| 65 20 63 6f 64 65 20 74 | 68 61 74 20 72 65 74 75 |e code t|hat retu|
|00004460| 72 6e 73 20 74 68 65 20 | 73 61 6d 65 20 61 6e 73 |rns the |same ans|
|00004470| 77 65 72 20 61 73 20 47 | 44 43 6c 75 74 53 69 7a |wer as G|DClutSiz|
|00004480| 65 28 64 65 76 69 63 65 | 29 2e 0d 09 2a 2f 0d 09 |e(device|)...*/..|
|00004490| 23 64 65 66 69 6e 65 20 | 47 44 43 4c 55 54 53 49 |#define |GDCLUTSI|
|000044a0| 5a 45 28 64 65 76 69 63 | 65 29 20 28 67 64 43 6c |ZE(devic|e) (gdCl|
|000044b0| 75 74 53 69 7a 65 54 61 | 62 6c 65 5b 28 2a 2a 28 |utSizeTa|ble[(**(|
|000044c0| 2a 2a 28 64 65 76 69 63 | 65 29 29 2e 67 64 50 4d |**(devic|e)).gdPM|
|000044d0| 61 70 29 2e 70 69 78 65 | 6c 53 69 7a 65 5d 29 0d |ap).pixe|lSize]).|
|000044e0| 09 0d 09 2f 2a 20 20 43 | 6f 6d 6d 65 6e 74 65 64 |.../* C|ommented|
|000044f0| 20 6f 75 74 2c 20 62 65 | 63 61 75 73 65 20 69 74 | out, be|cause it|
|00004500| 73 20 61 6e 73 77 65 72 | 20 69 73 20 6d 69 73 6c |s answer| is misl|
|00004510| 65 61 64 69 6e 67 20 77 | 68 65 6e 20 69 6e 20 31 |eading w|hen in 1|
|00004520| 36 2d 62 69 74 20 6f 72 | 20 33 32 2d 62 69 74 20 |6-bit or| 32-bit |
|00004530| 6d 6f 64 65 2e 20 2a 2f | 0d 09 2f 2a 20 23 64 65 |mode. */|../* #de|
|00004540| 66 69 6e 65 20 47 44 43 | 4f 4c 4f 52 53 28 64 65 |fine GDC|OLORS(de|
|00004550| 76 69 63 65 29 20 28 28 | 2a 2a 28 2a 2a 28 2a 2a |vice) ((|**(**(**|
|00004560| 64 65 76 69 63 65 29 2e | 67 64 50 4d 61 70 29 2e |device).|gdPMap).|
|00004570| 70 6d 54 61 62 6c 65 29 | 2e 63 74 53 69 7a 65 2b |pmTable)|.ctSize+|
|00004580| 31 29 20 2a 2f 0d 23 65 | 6e 64 69 66 0d 0d 2f 2a |1) */.#e|ndif../*|
|00004590| 0d 46 49 58 45 44 20 50 | 4f 49 4e 54 20 41 52 49 |.FIXED P|OINT ARI|
|000045a0| 54 48 4d 45 54 49 43 0d | 41 70 70 6c 65 20 64 65 |THMETIC.|Apple de|
|000045b0| 66 69 6e 65 73 20 61 20 | 68 61 6e 64 79 20 64 61 |fines a |handy da|
|000045c0| 74 61 20 74 79 70 65 20 | 63 61 6c 6c 65 64 20 46 |ta type |called F|
|000045d0| 69 78 65 64 20 74 68 61 | 74 20 69 73 20 73 74 6f |ixed tha|t is sto|
|000045e0| 72 65 64 20 69 6e 20 61 | 20 6c 6f 6e 67 2c 20 62 |red in a| long, b|
|000045f0| 75 74 20 69 73 0d 61 73 | 73 75 6d 65 64 20 74 6f |ut is.as|sumed to|
|00004600| 20 68 61 76 65 20 61 20 | 64 65 63 69 6d 61 6c 20 | have a |decimal |
|00004610| 70 6f 69 6e 74 20 69 6e | 20 74 68 65 20 6d 69 64 |point in| the mid|
|00004620| 64 6c 65 2e 20 4d 61 6e | 79 20 6f 70 65 72 61 74 |dle. Man|y operat|
|00004630| 69 6f 6e 73 2c 20 65 2e | 67 2e 20 61 64 64 69 6e |ions, e.|g. addin|
|00004640| 67 20 74 77 6f 0d 46 69 | 78 65 64 20 6e 75 6d 62 |g two.Fi|xed numb|
|00004650| 65 72 73 20 6f 72 20 6d | 75 6c 74 69 70 6c 79 69 |ers or m|ultiplyi|
|00004660| 6e 67 20 6f 72 20 64 69 | 76 69 64 69 6e 67 20 61 |ng or di|viding a|
|00004670| 20 46 69 78 65 64 20 62 | 79 20 61 6e 20 69 6e 74 | Fixed b|y an int|
|00004680| 65 67 65 72 2c 20 63 61 | 6e 20 62 65 20 70 65 72 |eger, ca|n be per|
|00004690| 66 6f 72 6d 65 64 0d 64 | 69 72 65 63 74 6c 79 2e |formed.d|irectly.|
|000046a0| 20 54 6f 20 6d 75 6c 74 | 69 70 6c 79 20 6f 72 20 | To mult|iply or |
|000046b0| 64 69 76 69 64 65 20 74 | 77 6f 20 46 69 78 65 64 |divide t|wo Fixed|
|000046c0| 20 6e 75 6d 62 65 72 73 | 20 75 73 65 20 41 70 70 | numbers| use App|
|000046d0| 6c 65 27 73 20 46 69 78 | 4d 75 6c 28 29 20 61 6e |le's Fix|Mul() an|
|000046e0| 64 0d 46 69 78 44 69 76 | 28 29 2e 20 46 69 78 52 |d.FixDiv|(). FixR|
|000046f0| 61 74 69 6f 28 6e 2c 6d | 29 20 72 65 74 75 72 6e |atio(n,m|) return|
|00004700| 73 20 74 68 65 20 46 69 | 78 65 64 20 72 61 74 69 |s the Fi|xed rati|
|00004710| 6f 20 6f 66 20 74 77 6f | 20 69 6e 74 65 67 65 72 |o of two| integer|
|00004720| 73 2e 20 4d 61 63 69 6e | 74 6f 73 68 20 43 0d 63 |s. Macin|tosh C.c|
|00004730| 6f 6d 70 69 6c 65 72 73 | 20 64 65 66 69 6e 65 20 |ompilers| define |
|00004740| 64 6f 75 62 6c 65 20 69 | 6e 20 76 61 72 69 6f 75 |double i|n variou|
|00004750| 73 20 77 61 79 73 2c 20 | 64 65 70 65 6e 64 69 6e |s ways, |dependin|
|00004760| 67 20 6f 6e 20 77 68 65 | 74 68 65 72 20 61 20 66 |g on whe|ther a f|
|00004770| 6c 6f 61 74 69 6e 67 20 | 70 6f 69 6e 74 0d 75 6e |loating |point.un|
|00004780| 69 74 20 69 73 20 74 6f | 20 62 65 20 75 73 65 64 |it is to| be used|
|00004790| 2e 20 54 68 65 20 41 70 | 70 6c 65 2d 70 72 6f 76 |. The Ap|ple-prov|
|000047a0| 69 64 65 64 20 72 6f 75 | 74 69 6e 65 73 20 66 6f |ided rou|tines fo|
|000047b0| 72 20 64 6f 69 6e 67 20 | 74 79 70 65 20 63 6f 6e |r doing |type con|
|000047c0| 76 65 72 73 69 6f 6e 20 | 74 6f 20 61 6e 64 0d 66 |version |to and.f|
|000047d0| 72 6f 6d 20 46 69 78 65 | 64 20 61 72 65 20 6f 6e |rom Fixe|d are on|
|000047e0| 6c 79 20 61 70 70 72 6f | 70 72 69 61 74 65 20 69 |ly appro|priate i|
|000047f0| 66 20 79 6f 75 20 61 72 | 65 20 4e 4f 54 20 75 73 |f you ar|e NOT us|
|00004800| 69 6e 67 20 74 68 65 20 | 66 6c 6f 61 74 69 6e 67 |ing the |floating|
|00004810| 20 70 6f 69 6e 74 20 75 | 6e 69 74 2e 0d 54 68 65 | point u|nit..The|
|00004820| 20 6f 6e 65 73 20 64 65 | 66 69 6e 65 64 20 62 65 | ones de|fined be|
|00004830| 6c 6f 77 20 61 72 65 20 | 66 61 73 74 65 72 20 61 |low are |faster a|
|00004840| 6e 64 20 77 6f 72 6b 20 | 77 69 74 68 20 6f 72 20 |nd work |with or |
|00004850| 77 69 74 68 6f 75 74 20 | 74 68 65 20 46 50 55 2e |without |the FPU.|
|00004860| 0d 2a 2f 0d 23 64 65 66 | 69 6e 65 20 4c 6f 6e 67 |.*/.#def|ine Long|
|00004870| 54 6f 46 69 78 28 78 29 | 20 28 28 6c 6f 6e 67 29 |ToFix(x)| ((long)|
|00004880| 28 78 29 3c 3c 31 36 29 | 0d 23 64 65 66 69 6e 65 |(x)<<16)|.#define|
|00004890| 20 46 69 78 54 6f 4c 6f | 6e 67 28 78 29 20 28 28 | FixToLo|ng(x) ((|
|000048a0| 78 29 3e 3e 31 36 29 0d | 23 64 65 66 69 6e 65 20 |x)>>16).|#define |
|000048b0| 44 6f 75 62 6c 65 54 6f | 46 69 78 28 78 29 20 28 |DoubleTo|Fix(x) (|
|000048c0| 28 6c 6f 6e 67 29 28 28 | 78 29 2a 36 35 35 33 36 |(long)((|x)*65536|
|000048d0| 2e 2b 30 2e 35 29 29 0d | 23 64 65 66 69 6e 65 20 |.+0.5)).|#define |
|000048e0| 46 69 78 54 6f 44 6f 75 | 62 6c 65 28 78 29 20 28 |FixToDou|ble(x) (|
|000048f0| 28 64 6f 75 62 6c 65 29 | 28 78 29 2a 28 31 2e 2f |(double)|(x)*(1./|
|00004900| 36 35 35 33 36 2e 29 29 | 0d 0d 23 69 66 20 4d 41 |65536.))|..#if MA|
|00004910| 43 5f 43 0d 09 2f 2a 0d | 09 53 54 41 43 4b 0d 09 |C_C../*.|.STACK..|
|00004920| 53 74 61 63 6b 47 72 6f | 77 28 6e 29 20 69 6e 63 |StackGro|w(n) inc|
|00004930| 72 65 61 73 65 73 20 74 | 68 65 20 73 74 61 63 6b |reases t|he stack|
|00004940| 20 61 6c 6c 6f 63 61 74 | 69 6f 6e 20 62 79 20 6e | allocat|ion by n|
|00004950| 20 62 79 74 65 73 2e 20 | 59 6f 75 27 6c 6c 20 61 | bytes. |You'll a|
|00004960| 6c 73 6f 20 77 61 6e 74 | 20 74 6f 20 75 73 65 0d |lso want| to use.|
|00004970| 09 41 70 70 6c 65 27 73 | 20 53 74 61 63 6b 53 70 |.Apple's| StackSp|
|00004980| 61 63 65 28 29 2c 20 64 | 65 63 6c 61 72 65 64 20 |ace(), d|eclared |
|00004990| 69 6e 20 4d 65 6d 6f 72 | 79 2e 68 2c 20 74 68 61 |in Memor|y.h, tha|
|000049a0| 74 20 72 65 74 75 72 6e | 73 20 74 68 65 20 6e 75 |t return|s the nu|
|000049b0| 6d 62 65 72 20 6f 66 20 | 62 79 74 65 73 20 0d 09 |mber of |bytes ..|
|000049c0| 61 6c 6c 6f 63 61 74 65 | 64 20 66 6f 72 20 74 68 |allocate|d for th|
|000049d0| 65 20 73 74 61 63 6b 2e | 0d 09 2a 2f 0d 09 23 64 |e stack.|..*/..#d|
|000049e0| 65 66 69 6e 65 20 53 74 | 61 63 6b 47 72 6f 77 28 |efine St|ackGrow(|
|000049f0| 65 78 74 72 61 42 79 74 | 65 73 29 20 53 65 74 41 |extraByt|es) SetA|
|00004a00| 70 70 6c 4c 69 6d 69 74 | 28 47 65 74 41 70 70 6c |pplLimit|(GetAppl|
|00004a10| 4c 69 6d 69 74 28 29 2d | 28 65 78 74 72 61 42 79 |Limit()-|(extraBy|
|00004a20| 74 65 73 29 29 0d 23 65 | 6e 64 69 66 0d 0d 2f 2a |tes)).#e|ndif../*|
|00004a30| 20 41 73 73 69 67 6e 2e | 63 20 2a 2f 0d 0d 23 64 | Assign.|c */..#d|
|00004a40| 65 66 69 6e 65 20 41 53 | 53 49 47 4e 5f 44 49 4d |efine AS|SIGN_DIM|
|00004a50| 53 20 33 09 09 2f 2a 20 | 46 65 65 6c 20 66 72 65 |S 3../* |Feel fre|
|00004a60| 65 20 74 6f 20 69 6e 63 | 72 65 61 73 65 20 6f 72 |e to inc|rease or|
|00004a70| 20 64 65 63 72 65 61 73 | 65 20 41 53 53 49 47 4e | decreas|e ASSIGN|
|00004a80| 5f 44 49 4d 53 2e 20 2a | 2f 0d 74 79 70 65 64 65 |_DIMS. *|/.typede|
|00004a90| 66 20 73 74 72 75 63 74 | 20 7b 0d 09 73 68 6f 72 |f struct| {..shor|
|00004aa0| 74 20 74 79 70 65 3b 0d | 09 75 6e 73 69 67 6e 65 |t type;.|.unsigne|
|00004ab0| 64 20 73 69 7a 65 64 4f | 6e 63 65 3a 31 3b 09 2f |d sizedO|nce:1;./|
|00004ac0| 2a 20 64 69 6d 5b 5d 20 | 69 73 20 6d 65 61 6e 69 |* dim[] |is meani|
|00004ad0| 6e 67 66 75 6c 20 2a 2f | 0d 09 75 6e 73 69 67 6e |ngful */|..unsign|
|00004ae0| 65 64 20 73 69 7a 65 64 | 3a 31 3b 09 09 2f 2a 20 |ed sized|:1;../* |
|00004af0| 64 69 6d 5b 5d 20 69 73 | 20 66 69 6e 61 6c 20 2a |dim[] is| final *|
|00004b00| 2f 0d 09 75 6e 73 69 67 | 6e 65 64 20 6d 61 6c 6c |/..unsig|ned mall|
|00004b10| 6f 63 65 64 3a 31 3b 09 | 2f 2a 20 61 6c 6c 6f 63 |oced:1;.|/* alloc|
|00004b20| 61 74 65 64 20 62 79 20 | 6d 61 6c 6c 6f 63 20 2a |ated by |malloc *|
|00004b30| 2f 0d 09 63 68 61 72 20 | 2a 6e 61 6d 65 3b 0d 09 |/..char |*name;..|
|00004b40| 76 6f 69 64 20 2a 70 74 | 72 3b 09 09 09 09 2f 2a |void *pt|r;..../*|
|00004b50| 20 66 6f 72 20 61 72 72 | 61 79 2c 20 61 64 64 72 | for arr|ay, addr|
|00004b60| 65 73 73 20 6f 66 20 65 | 6c 65 6d 65 6e 74 20 7a |ess of e|lement z|
|00004b70| 65 72 6f 20 2a 2f 0d 09 | 6c 6f 6e 67 20 64 69 6d |ero */..|long dim|
|00004b80| 5b 41 53 53 49 47 4e 5f | 44 49 4d 53 5d 3b 09 2f |[ASSIGN_|DIMS];./|
|00004b90| 2a 20 7a 65 72 6f 20 69 | 6e 64 69 63 61 74 65 73 |* zero i|ndicates|
|00004ba0| 20 61 20 73 63 61 6c 61 | 72 20 2a 2f 0d 09 6c 6f | a scala|r */..lo|
|00004bb0| 6e 67 20 66 69 72 73 74 | 45 6c 65 6d 65 6e 74 3b |ng first|Element;|
|00004bc0| 09 09 2f 2a 20 66 6f 72 | 20 31 2d 64 20 61 72 72 |../* for| 1-d arr|
|00004bd0| 61 79 2c 20 69 6e 64 65 | 78 20 6f 66 20 66 69 72 |ay, inde|x of fir|
|00004be0| 73 74 20 61 72 72 61 79 | 20 65 6c 65 6d 65 6e 74 |st array| element|
|00004bf0| 2e 20 55 73 75 61 6c 6c | 79 20 30 20 2a 2f 0d 09 |. Usuall|y 0 */..|
|00004c00| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 63 6f 6d 6d |const ch|ar *comm|
|00004c10| 65 6e 74 3b 09 2f 2a 20 | 74 65 78 74 20 73 74 72 |ent;./* |text str|
|00004c20| 69 6e 67 2c 20 6f 72 20 | 4e 55 4c 4c 20 2a 2f 0d |ing, or |NULL */.|
|00004c30| 7d 20 44 65 73 63 72 69 | 70 74 69 6f 6e 3b 0d 65 |} Descri|ption;.e|
|00004c40| 6e 75 6d 7b 61 73 73 69 | 67 6e 52 65 70 6f 72 74 |num{assi|gnReport|
|00004c50| 55 6e 6b 6e 6f 77 6e 3d | 31 2c 61 73 73 69 67 6e |Unknown=|1,assign|
|00004c60| 4e 6f 48 65 78 49 6e 74 | 73 3d 32 2c 61 73 73 69 |NoHexInt|s=2,assi|
|00004c70| 67 6e 48 65 78 46 6c 6f | 61 74 73 3d 34 0d 09 2c |gnHexFlo|ats=4..,|
|00004c80| 61 73 73 69 67 6e 4e 6f | 43 6f 6d 6d 65 6e 74 3d |assignNo|Comment=|
|00004c90| 38 2c 61 73 73 69 67 6e | 4e 6f 50 72 69 6e 74 66 |8,assign|NoPrintf|
|00004ca0| 45 78 69 74 3d 30 78 31 | 30 0d 09 2c 61 73 73 69 |Exit=0x1|0..,assi|
|00004cb0| 67 6e 45 63 68 6f 41 73 | 73 69 67 6e 6d 65 6e 74 |gnEchoAs|signment|
|00004cc0| 73 3d 30 78 32 30 2c 61 | 73 73 69 67 6e 45 63 68 |s=0x20,a|ssignEch|
|00004cd0| 6f 43 6f 6d 6d 65 6e 74 | 73 3d 30 78 34 30 2c 61 |oComment|s=0x40,a|
|00004ce0| 73 73 69 67 6e 45 63 68 | 6f 46 69 6c 65 3d 30 78 |ssignEch|oFile=0x|
|00004cf0| 38 30 0d 7d 3b 0d 65 6e | 75 6d 20 7b 61 73 73 69 |80.};.en|um {assi|
|00004d00| 67 6e 4d 65 6d 6f 72 79 | 45 72 72 6f 72 3d 2d 31 |gnMemory|Error=-1|
|00004d10| 2c 61 73 73 69 67 6e 54 | 79 70 65 45 72 72 6f 72 |,assignT|ypeError|
|00004d20| 3d 2d 32 0d 09 2c 61 73 | 73 69 67 6e 56 61 72 69 |=-2..,as|signVari|
|00004d30| 61 62 6c 65 45 72 72 6f | 72 3d 2d 33 2c 61 73 73 |ableErro|r=-3,ass|
|00004d40| 69 67 6e 55 6e 6b 6e 6f | 77 6e 56 61 72 69 61 62 |ignUnkno|wnVariab|
|00004d50| 6c 65 45 72 72 6f 72 3d | 2d 34 0d 09 2c 61 73 73 |leError=|-4..,ass|
|00004d60| 69 67 6e 53 75 62 73 63 | 72 69 70 74 45 72 72 6f |ignSubsc|riptErro|
|00004d70| 72 3d 2d 35 2c 61 73 73 | 69 67 6e 53 75 62 73 63 |r=-5,ass|ignSubsc|
|00004d80| 72 69 70 74 42 6f 75 6e | 64 73 45 72 72 6f 72 3d |riptBoun|dsError=|
|00004d90| 2d 36 0d 09 2c 61 73 73 | 69 67 6e 45 71 75 61 6c |-6..,ass|ignEqual|
|00004da0| 73 45 72 72 6f 72 3d 2d | 37 2c 61 73 73 69 67 6e |sError=-|7,assign|
|00004db0| 43 6f 6e 73 74 61 6e 74 | 45 72 72 6f 72 3d 2d 38 |Constant|Error=-8|
|00004dc0| 2c 61 73 73 69 67 6e 48 | 65 78 45 72 72 6f 72 3d |,assignH|exError=|
|00004dd0| 2d 39 0d 09 2c 61 73 73 | 69 67 6e 53 65 6d 69 63 |-9..,ass|ignSemic|
|00004de0| 6f 6c 6f 6e 45 72 72 6f | 72 3d 2d 31 30 2c 61 73 |olonErro|r=-10,as|
|00004df0| 73 69 67 6e 46 69 6c 65 | 45 72 72 6f 72 3d 2d 31 |signFile|Error=-1|
|00004e00| 31 0d 09 2c 61 73 73 69 | 67 6e 49 6e 63 6f 6e 73 |1..,assi|gnIncons|
|00004e10| 69 73 74 65 6e 74 44 65 | 73 63 72 69 70 74 69 6f |istentDe|scriptio|
|00004e20| 6e 73 45 72 72 6f 72 3d | 2d 31 32 2c 61 73 73 69 |nsError=|-12,assi|
|00004e30| 67 6e 55 6e 65 71 75 61 | 6c 44 61 74 61 45 72 72 |gnUnequa|lDataErr|
|00004e40| 6f 72 3d 2d 31 33 0d 09 | 2c 61 73 73 69 67 6e 49 |or=-13..|,assignI|
|00004e50| 6e 63 6f 6e 73 69 73 74 | 65 6e 74 44 69 6d 65 6e |nconsist|entDimen|
|00004e60| 73 69 6f 6e 73 45 72 72 | 6f 72 3d 2d 31 34 0d 09 |sionsErr|or=-14..|
|00004e70| 2c 61 73 73 69 67 6e 43 | 6f 75 6c 64 6e 74 46 69 |,assignC|ouldntFi|
|00004e80| 6e 64 44 65 73 63 72 69 | 70 74 69 6f 6e 3d 2d 31 |ndDescri|ption=-1|
|00004e90| 35 0d 7d 3b 0d 65 6e 75 | 6d 7b 63 68 61 72 54 79 |5.};.enu|m{charTy|
|00004ea0| 70 65 3d 31 2c 75 6e 73 | 69 67 6e 65 64 43 68 61 |pe=1,uns|ignedCha|
|00004eb0| 72 54 79 70 65 2c 73 68 | 6f 72 74 54 79 70 65 2c |rType,sh|ortType,|
|00004ec0| 75 6e 73 69 67 6e 65 64 | 53 68 6f 72 74 54 79 70 |unsigned|ShortTyp|
|00004ed0| 65 0d 09 2c 6c 6f 6e 67 | 54 79 70 65 2c 75 6e 73 |e..,long|Type,uns|
|00004ee0| 69 67 6e 65 64 4c 6f 6e | 67 54 79 70 65 0d 09 2c |ignedLon|gType..,|
|00004ef0| 66 6c 6f 61 74 54 79 70 | 65 0d 09 23 69 66 20 53 |floatTyp|e..#if S|
|00004f00| 48 4f 52 54 5f 44 4f 55 | 42 4c 45 5f 4f 4b 0d 09 |HORT_DOU|BLE_OK..|
|00004f10| 09 2c 73 68 6f 72 74 44 | 6f 75 62 6c 65 54 79 70 |.,shortD|oubleTyp|
|00004f20| 65 0d 09 23 65 6e 64 69 | 66 0d 09 2c 64 6f 75 62 |e..#endi|f..,doub|
|00004f30| 6c 65 54 79 70 65 0d 09 | 2c 63 68 61 72 50 74 72 |leType..|,charPtr|
|00004f40| 54 79 70 65 2c 75 6e 73 | 69 67 6e 65 64 43 68 61 |Type,uns|ignedCha|
|00004f50| 72 50 74 72 54 79 70 65 | 2c 73 68 6f 72 74 50 74 |rPtrType|,shortPt|
|00004f60| 72 54 79 70 65 2c 75 6e | 73 69 67 6e 65 64 53 68 |rType,un|signedSh|
|00004f70| 6f 72 74 50 74 72 54 79 | 70 65 0d 09 2c 6c 6f 6e |ortPtrTy|pe..,lon|
|00004f80| 67 50 74 72 54 79 70 65 | 2c 75 6e 73 69 67 6e 65 |gPtrType|,unsigne|
|00004f90| 64 4c 6f 6e 67 50 74 72 | 54 79 70 65 0d 09 2c 66 |dLongPtr|Type..,f|
|00004fa0| 6c 6f 61 74 50 74 72 54 | 79 70 65 0d 09 23 69 66 |loatPtrT|ype..#if|
|00004fb0| 20 53 48 4f 52 54 5f 44 | 4f 55 42 4c 45 5f 4f 4b | SHORT_D|OUBLE_OK|
|00004fc0| 0d 09 09 2c 73 68 6f 72 | 74 44 6f 75 62 6c 65 50 |...,shor|tDoubleP|
|00004fd0| 74 72 54 79 70 65 0d 09 | 23 65 6e 64 69 66 0d 09 |trType..|#endif..|
|00004fe0| 2c 64 6f 75 62 6c 65 50 | 74 72 54 79 70 65 0d 09 |,doubleP|trType..|
|00004ff0| 2c 73 74 72 69 6e 67 54 | 79 70 65 2c 75 6e 6b 6e |,stringT|ype,unkn|
|00005000| 6f 77 6e 54 79 70 65 0d | 7d 3b 0d 46 49 4c 45 20 |ownType.|};.FILE |
|00005010| 2a 4f 70 65 6e 43 61 6c | 46 69 6c 65 52 65 61 64 |*OpenCal|FileRead|
|00005020| 28 63 68 61 72 20 2a 66 | 69 6c 65 6e 61 6d 65 29 |(char *f|ilename)|
|00005030| 3b 0d 46 49 4c 45 20 2a | 4f 70 65 6e 43 61 6c 46 |;.FILE *|OpenCalF|
|00005040| 69 6c 65 52 65 61 64 41 | 6e 64 43 68 65 63 6b 28 |ileReadA|ndCheck(|
|00005050| 63 68 61 72 20 2a 66 69 | 6c 65 6e 61 6d 65 29 3b |char *fi|lename);|
|00005060| 0d 46 49 4c 45 20 2a 4f | 70 65 6e 43 61 6c 46 69 |.FILE *O|penCalFi|
|00005070| 6c 65 57 72 69 74 65 28 | 63 68 61 72 20 2a 66 69 |leWrite(|char *fi|
|00005080| 6c 65 6e 61 6d 65 29 3b | 0d 76 6f 69 64 20 41 70 |lename);|.void Ap|
|00005090| 70 65 6e 64 44 65 73 63 | 72 69 70 74 69 6f 6e 73 |pendDesc|riptions|
|000050a0| 28 44 65 73 63 72 69 70 | 74 69 6f 6e 20 2a 2a 64 |(Descrip|tion **d|
|000050b0| 2c 44 65 73 63 72 69 70 | 74 69 6f 6e 20 2a 73 29 |,Descrip|tion *s)|
|000050c0| 3b 0d 76 6f 69 64 20 43 | 6f 70 79 44 65 73 63 72 |;.void C|opyDescr|
|000050d0| 69 70 74 69 6f 6e 73 28 | 44 65 73 63 72 69 70 74 |iptions(|Descript|
|000050e0| 69 6f 6e 20 2a 64 2c 44 | 65 73 63 72 69 70 74 69 |ion *d,D|escripti|
|000050f0| 6f 6e 20 2a 73 29 3b 0d | 44 65 73 63 72 69 70 74 |on *s);.|Descript|
|00005100| 69 6f 6e 20 2a 41 6c 6c | 6f 63 61 74 65 44 65 73 |ion *All|ocateDes|
|00005110| 63 72 69 70 74 69 6f 6e | 73 28 6c 6f 6e 67 20 6e |cription|s(long n|
|00005120| 29 3b 0d 76 6f 69 64 20 | 46 72 65 65 44 65 73 63 |);.void |FreeDesc|
|00005130| 72 69 70 74 69 6f 6e 73 | 28 44 65 73 63 72 69 70 |riptions|(Descrip|
|00005140| 74 69 6f 6e 20 2a 64 29 | 3b 0d 6c 6f 6e 67 20 4e |tion *d)|;.long N|
|00005150| 75 6d 62 65 72 4f 66 44 | 65 73 63 72 69 70 74 69 |umberOfD|escripti|
|00005160| 6f 6e 73 28 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ons(Desc|ription |
|00005170| 2a 64 29 3b 0d 44 65 73 | 63 72 69 70 74 69 6f 6e |*d);.Des|cription|
|00005180| 20 4e 75 6c 6c 44 65 73 | 63 72 69 70 74 69 6f 6e | NullDes|cription|
|00005190| 28 76 6f 69 64 29 3b 0d | 69 6e 74 20 49 73 4e 75 |(void);.|int IsNu|
|000051a0| 6c 6c 44 65 73 63 72 69 | 70 74 69 6f 6e 28 44 65 |llDescri|ption(De|
|000051b0| 73 63 72 69 70 74 69 6f | 6e 20 64 29 3b 0d 23 64 |scriptio|n d);.#d|
|000051c0| 65 66 69 6e 65 20 49 73 | 4e 75 6c 6c 44 65 73 63 |efine Is|NullDesc|
|000051d0| 72 69 70 74 69 6f 6e 28 | 64 29 20 28 28 64 29 2e |ription(|d) ((d).|
|000051e0| 74 79 70 65 3d 3d 30 29 | 0d 69 6e 74 20 41 73 73 |type==0)|.int Ass|
|000051f0| 69 67 6e 6d 65 6e 74 4c | 69 6e 65 57 61 73 42 6c |ignmentL|ineWasBl|
|00005200| 61 6e 6b 28 76 6f 69 64 | 29 3b 0d 69 6e 74 20 55 |ank(void|);.int U|
|00005210| 6e 65 71 75 61 6c 44 65 | 73 63 72 69 62 65 64 56 |nequalDe|scribedV|
|00005220| 61 72 73 28 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ars(Desc|ription |
|00005230| 64 31 5b 5d 2c 44 65 73 | 63 72 69 70 74 69 6f 6e |d1[],Des|cription|
|00005240| 20 64 32 5b 5d 2c 73 68 | 6f 72 74 20 66 6c 61 67 | d2[],sh|ort flag|
|00005250| 73 29 3b 0d 69 6e 74 20 | 55 6e 65 71 75 61 6c 44 |s);.int |UnequalD|
|00005260| 65 73 63 72 69 62 65 64 | 56 61 72 50 61 69 72 28 |escribed|VarPair(|
|00005270| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 2a 64 31 2c |Descript|ion *d1,|
|00005280| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 2a 64 32 2c |Descript|ion *d2,|
|00005290| 73 68 6f 72 74 20 66 6c | 61 67 73 29 3b 0d 69 6e |short fl|ags);.in|
|000052a0| 74 20 43 6f 70 79 44 65 | 73 63 72 69 62 65 64 56 |t CopyDe|scribedV|
|000052b0| 61 72 73 28 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ars(Desc|ription |
|000052c0| 64 31 5b 5d 2c 44 65 73 | 63 72 69 70 74 69 6f 6e |d1[],Des|cription|
|000052d0| 20 64 32 5b 5d 2c 73 68 | 6f 72 74 20 66 6c 61 67 | d2[],sh|ort flag|
|000052e0| 73 29 3b 0d 69 6e 74 20 | 43 6f 70 79 44 65 73 63 |s);.int |CopyDesc|
|000052f0| 72 69 62 65 64 56 61 72 | 50 61 69 72 28 44 65 73 |ribedVar|Pair(Des|
|00005300| 63 72 69 70 74 69 6f 6e | 20 2a 64 31 2c 44 65 73 |cription| *d1,Des|
|00005310| 63 72 69 70 74 69 6f 6e | 20 2a 64 32 2c 73 68 6f |cription| *d2,sho|
|00005320| 72 74 20 66 6c 61 67 73 | 29 3b 0d 6c 6f 6e 67 20 |rt flags|);.long |
|00005330| 49 6e 69 74 69 61 6c 69 | 7a 65 41 44 65 73 63 72 |Initiali|zeADescr|
|00005340| 69 62 65 64 56 61 72 28 | 44 65 73 63 72 69 70 74 |ibedVar(|Descript|
|00005350| 69 6f 6e 20 2a 64 2c 73 | 68 6f 72 74 20 66 6c 61 |ion *d,s|hort fla|
|00005360| 67 73 29 3b 0d 6c 6f 6e | 67 20 49 6e 69 74 69 61 |gs);.lon|g Initia|
|00005370| 6c 69 7a 65 44 65 73 63 | 72 69 62 65 64 56 61 72 |lizeDesc|ribedVar|
|00005380| 73 28 44 65 73 63 72 69 | 70 74 69 6f 6e 20 64 5b |s(Descri|ption d[|
|00005390| 5d 2c 73 68 6f 72 74 20 | 66 6c 61 67 73 29 3b 0d |],short |flags);.|
|000053a0| 6c 6f 6e 67 20 46 69 6e | 64 44 65 73 63 72 69 62 |long Fin|dDescrib|
|000053b0| 65 64 44 69 6d 28 44 65 | 73 63 72 69 70 74 69 6f |edDim(De|scriptio|
|000053c0| 6e 20 64 5b 5d 2c 76 6f | 69 64 20 2a 70 74 72 2c |n d[],vo|id *ptr,|
|000053d0| 69 6e 74 20 69 2c 73 68 | 6f 72 74 20 66 6c 61 67 |int i,sh|ort flag|
|000053e0| 73 29 3b 0d 6c 6f 6e 67 | 20 46 69 6e 64 44 65 73 |s);.long| FindDes|
|000053f0| 63 72 69 70 74 69 6f 6e | 28 44 65 73 63 72 69 70 |cription|(Descrip|
|00005400| 74 69 6f 6e 20 64 5b 5d | 2c 76 6f 69 64 20 2a 70 |tion d[]|,void *p|
|00005410| 74 72 2c 73 68 6f 72 74 | 20 66 6c 61 67 73 29 3b |tr,short| flags);|
|00005420| 0d 76 6f 69 64 20 46 72 | 65 65 41 44 65 73 63 72 |.void Fr|eeADescr|
|00005430| 69 62 65 64 56 61 72 28 | 44 65 73 63 72 69 70 74 |ibedVar(|Descript|
|00005440| 69 6f 6e 20 2a 64 2c 73 | 68 6f 72 74 20 66 6c 61 |ion *d,s|hort fla|
|00005450| 67 73 29 3b 0d 76 6f 69 | 64 20 46 72 65 65 44 65 |gs);.voi|d FreeDe|
|00005460| 73 63 72 69 62 65 64 50 | 74 72 56 61 72 73 28 44 |scribedP|trVars(D|
|00005470| 65 73 63 72 69 70 74 69 | 6f 6e 20 64 5b 5d 2c 73 |escripti|on d[],s|
|00005480| 68 6f 72 74 20 66 6c 61 | 67 73 29 3b 0d 76 6f 69 |hort fla|gs);.voi|
|00005490| 64 20 46 72 65 65 44 65 | 73 63 72 69 62 65 64 56 |d FreeDe|scribedV|
|000054a0| 61 72 73 28 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ars(Desc|ription |
|000054b0| 64 5b 5d 2c 73 68 6f 72 | 74 20 66 6c 61 67 73 29 |d[],shor|t flags)|
|000054c0| 3b 0d 76 6f 69 64 20 4b | 65 65 70 44 65 73 63 72 |;.void K|eepDescr|
|000054d0| 69 62 65 64 56 61 72 73 | 28 44 65 73 63 72 69 70 |ibedVars|(Descrip|
|000054e0| 74 69 6f 6e 20 64 5b 5d | 2c 73 68 6f 72 74 20 66 |tion d[]|,short f|
|000054f0| 6c 61 67 73 29 3b 0d 76 | 6f 69 64 20 4b 65 65 70 |lags);.v|oid Keep|
|00005500| 41 44 65 73 63 72 69 62 | 65 64 56 61 72 28 44 65 |ADescrib|edVar(De|
|00005510| 73 63 72 69 70 74 69 6f | 6e 20 2a 64 2c 73 68 6f |scriptio|n *d,sho|
|00005520| 72 74 20 66 6c 61 67 73 | 29 3b 0d 6c 6f 6e 67 20 |rt flags|);.long |
|00005530| 50 72 69 6e 74 41 6e 41 | 73 73 69 67 6e 6d 65 6e |PrintAnA|ssignmen|
|00005540| 74 28 46 49 4c 45 20 2a | 73 74 72 65 61 6d 2c 44 |t(FILE *|stream,D|
|00005550| 65 73 63 72 69 70 74 69 | 6f 6e 20 2a 64 2c 73 68 |escripti|on *d,sh|
|00005560| 6f 72 74 20 66 6c 61 67 | 73 29 3b 0d 6c 6f 6e 67 |ort flag|s);.long|
|00005570| 20 50 72 69 6e 74 41 73 | 73 69 67 6e 6d 65 6e 74 | PrintAs|signment|
|00005580| 73 28 46 49 4c 45 20 2a | 73 74 72 65 61 6d 2c 44 |s(FILE *|stream,D|
|00005590| 65 73 63 72 69 70 74 69 | 6f 6e 20 64 5b 5d 2c 73 |escripti|on d[],s|
|000055a0| 68 6f 72 74 20 66 6c 61 | 67 73 29 3b 0d 6c 6f 6e |hort fla|gs);.lon|
|000055b0| 67 20 50 72 69 6e 74 41 | 73 73 69 67 6e 6d 65 6e |g PrintA|ssignmen|
|000055c0| 74 73 54 6f 46 69 6c 65 | 28 63 6f 6e 73 74 20 63 |tsToFile|(const c|
|000055d0| 68 61 72 20 2a 66 69 6c | 65 6e 61 6d 65 2c 44 65 |har *fil|ename,De|
|000055e0| 73 63 72 69 70 74 69 6f | 6e 20 64 5b 5d 2c 73 68 |scriptio|n d[],sh|
|000055f0| 6f 72 74 20 66 6c 61 67 | 73 29 3b 0d 6c 6f 6e 67 |ort flag|s);.long|
|00005600| 20 52 65 61 64 41 73 73 | 69 67 6e 6d 65 6e 74 4c | ReadAss|ignmentL|
|00005610| 69 6e 65 28 46 49 4c 45 | 20 2a 73 74 72 65 61 6d |ine(FILE| *stream|
|00005620| 2c 44 65 73 63 72 69 70 | 74 69 6f 6e 20 64 5b 5d |,Descrip|tion d[]|
|00005630| 2c 73 68 6f 72 74 20 66 | 6c 61 67 73 29 3b 0d 6c |,short f|lags);.l|
|00005640| 6f 6e 67 20 52 65 61 64 | 41 73 73 69 67 6e 6d 65 |ong Read|Assignme|
|00005650| 6e 74 42 6c 6f 63 6b 28 | 46 49 4c 45 20 2a 73 74 |ntBlock(|FILE *st|
|00005660| 72 65 61 6d 2c 44 65 73 | 63 72 69 70 74 69 6f 6e |ream,Des|cription|
|00005670| 20 64 5b 5d 2c 73 68 6f | 72 74 20 66 6c 61 67 73 | d[],sho|rt flags|
|00005680| 29 3b 0d 6c 6f 6e 67 20 | 52 65 61 64 41 73 73 69 |);.long |ReadAssi|
|00005690| 67 6e 6d 65 6e 74 53 74 | 72 65 61 6d 28 46 49 4c |gnmentSt|ream(FIL|
|000056a0| 45 20 2a 73 74 72 65 61 | 6d 2c 44 65 73 63 72 69 |E *strea|m,Descri|
|000056b0| 70 74 69 6f 6e 20 64 5b | 5d 2c 73 68 6f 72 74 20 |ption d[|],short |
|000056c0| 66 6c 61 67 73 29 3b 0d | 6c 6f 6e 67 20 52 65 61 |flags);.|long Rea|
|000056d0| 64 41 73 73 69 67 6e 6d | 65 6e 74 46 69 6c 65 28 |dAssignm|entFile(|
|000056e0| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 66 69 6c 65 |const ch|ar *file|
|000056f0| 6e 61 6d 65 2c 44 65 73 | 63 72 69 70 74 69 6f 6e |name,Des|cription|
|00005700| 20 64 5b 5d 2c 73 68 6f | 72 74 20 66 6c 61 67 73 | d[],sho|rt flags|
|00005710| 29 3b 0d 44 65 73 63 72 | 69 70 74 69 6f 6e 20 44 |);.Descr|iption D|
|00005720| 65 73 63 72 69 62 65 28 | 73 68 6f 72 74 20 74 79 |escribe(|short ty|
|00005730| 70 65 2c 76 6f 69 64 20 | 2a 70 74 72 2c 63 68 61 |pe,void |*ptr,cha|
|00005740| 72 20 2a 6e 61 6d 65 2c | 63 6f 6e 73 74 20 63 68 |r *name,|const ch|
|00005750| 61 72 20 2a 63 6f 6d 6d | 65 6e 74 29 3b 0d 44 65 |ar *comm|ent);.De|
|00005760| 73 63 72 69 70 74 69 6f | 6e 20 44 65 73 63 72 69 |scriptio|n Descri|
|00005770| 62 65 41 72 72 61 79 28 | 73 68 6f 72 74 20 74 79 |beArray(|short ty|
|00005780| 70 65 2c 76 6f 69 64 20 | 2a 70 74 72 2c 63 68 61 |pe,void |*ptr,cha|
|00005790| 72 20 2a 6e 61 6d 65 2c | 63 6f 6e 73 74 20 63 68 |r *name,|const ch|
|000057a0| 61 72 20 2a 63 6f 6d 6d | 65 6e 74 2c 2e 2e 2e 29 |ar *comm|ent,...)|
|000057b0| 3b 0d 44 65 73 63 72 69 | 70 74 69 6f 6e 20 44 65 |;.Descri|ption De|
|000057c0| 73 63 72 69 62 65 46 69 | 72 73 74 4c 61 73 74 28 |scribeFi|rstLast(|
|000057d0| 73 68 6f 72 74 20 74 79 | 70 65 2c 76 6f 69 64 20 |short ty|pe,void |
|000057e0| 2a 70 74 72 2c 63 68 61 | 72 20 2a 6e 61 6d 65 0d |*ptr,cha|r *name.|
|000057f0| 09 2c 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 63 6f |.,const |char *co|
|00005800| 6d 6d 65 6e 74 2c 6c 6f | 6e 67 20 66 69 72 73 74 |mment,lo|ng first|
|00005810| 45 6c 65 6d 65 6e 74 2c | 6c 6f 6e 67 20 6c 61 73 |Element,|long las|
|00005820| 74 45 6c 65 6d 65 6e 74 | 29 3b 0d 0d 2f 2a 20 42 |tElement|);../* B|
|00005830| 69 6e 6f 6d 69 61 6c 2e | 63 20 2a 2f 0d 0d 6c 6f |inomial.|c */..lo|
|00005840| 6e 67 09 42 69 6e 6f 6d | 69 61 6c 53 61 6d 70 6c |ng.Binom|ialSampl|
|00005850| 65 28 64 6f 75 62 6c 65 | 20 70 2c 6c 6f 6e 67 20 |e(double| p,long |
|00005860| 6e 29 3b 0d 69 6e 74 09 | 09 42 69 6e 6f 6d 69 61 |n);.int.|.Binomia|
|00005870| 6c 53 61 6d 70 6c 65 51 | 75 69 63 6b 6c 79 28 69 |lSampleQ|uickly(i|
|00005880| 6e 74 20 6e 29 3b 0d 64 | 6f 75 62 6c 65 09 42 69 |nt n);.d|ouble.Bi|
|00005890| 6e 6f 6d 69 61 6c 4c 6f | 77 65 72 42 6f 75 6e 64 |nomialLo|werBound|
|000058a0| 28 64 6f 75 62 6c 65 20 | 50 2c 6c 6f 6e 67 20 6b |(double |P,long k|
|000058b0| 2c 6c 6f 6e 67 20 6e 29 | 3b 0d 64 6f 75 62 6c 65 |,long n)|;.double|
|000058c0| 09 42 69 6e 6f 6d 69 61 | 6c 55 70 70 65 72 42 6f |.Binomia|lUpperBo|
|000058d0| 75 6e 64 28 64 6f 75 62 | 6c 65 20 50 2c 6c 6f 6e |und(doub|le P,lon|
|000058e0| 67 20 6b 2c 6c 6f 6e 67 | 20 6e 29 3b 0d 64 6f 75 |g k,long| n);.dou|
|000058f0| 62 6c 65 09 42 69 6e 6f | 6d 69 61 6c 50 64 66 28 |ble.Bino|mialPdf(|
|00005900| 64 6f 75 62 6c 65 20 70 | 2c 6c 6f 6e 67 20 6b 2c |double p|,long k,|
|00005910| 6c 6f 6e 67 20 6e 29 3b | 0d 64 6f 75 62 6c 65 09 |long n);|.double.|
|00005920| 42 69 6e 6f 6d 69 61 6c | 28 64 6f 75 62 6c 65 20 |Binomial|(double |
|00005930| 70 2c 6c 6f 6e 67 20 6b | 2c 6c 6f 6e 67 20 6e 29 |p,long k|,long n)|
|00005940| 3b 0d 64 6f 75 62 6c 65 | 09 49 6e 63 6f 6d 70 6c |;.double|.Incompl|
|00005950| 65 74 65 42 65 74 61 28 | 64 6f 75 62 6c 65 20 78 |eteBeta(|double x|
|00005960| 2c 64 6f 75 62 6c 65 20 | 61 2c 64 6f 75 62 6c 65 |,double |a,double|
|00005970| 20 62 29 3b 0d 64 6f 75 | 62 6c 65 09 49 6e 76 65 | b);.dou|ble.Inve|
|00005980| 72 73 65 42 69 6e 6f 6d | 69 61 6c 28 64 6f 75 62 |rseBinom|ial(doub|
|00005990| 6c 65 20 50 2c 6c 6f 6e | 67 20 6b 2c 6c 6f 6e 67 |le P,lon|g k,long|
|000059a0| 20 6e 29 3b 0d 64 6f 75 | 62 6c 65 09 49 6e 76 65 | n);.dou|ble.Inve|
|000059b0| 72 73 65 49 6e 63 6f 6d | 70 6c 65 74 65 42 65 74 |rseIncom|pleteBet|
|000059c0| 61 28 64 6f 75 62 6c 65 | 20 70 2c 64 6f 75 62 6c |a(double| p,doubl|
|000059d0| 65 20 61 2c 64 6f 75 62 | 6c 65 20 62 29 3b 0d 0d |e a,doub|le b);..|
|000059e0| 2f 2a 20 42 72 65 61 6b | 4c 69 6e 65 73 2e 63 20 |/* Break|Lines.c |
|000059f0| 2a 2f 0d 0d 63 68 61 72 | 20 2a 42 72 65 61 6b 4c |*/..char| *BreakL|
|00005a00| 69 6e 65 73 28 63 68 61 | 72 20 2a 73 74 72 69 6e |ines(cha|r *strin|
|00005a10| 67 2c 6c 6f 6e 67 20 6c | 69 6e 65 4c 65 6e 67 74 |g,long l|ineLengt|
|00005a20| 68 29 3b 0d 76 6f 69 64 | 20 50 72 69 6e 74 57 72 |h);.void| PrintWr|
|00005a30| 61 70 70 65 64 54 65 78 | 74 28 46 49 4c 45 20 2a |appedTex|t(FILE *|
|00005a40| 73 74 72 65 61 6d 2c 63 | 6f 6e 73 74 20 63 68 61 |stream,c|onst cha|
|00005a50| 72 20 2a 73 29 3b 0d 76 | 6f 69 64 20 50 72 69 6e |r *s);.v|oid Prin|
|00005a60| 74 57 72 61 70 70 65 64 | 54 65 78 74 54 6f 46 69 |tWrapped|TextToFi|
|00005a70| 6c 65 28 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 66 |le(const| char *f|
|00005a80| 69 6c 65 6e 61 6d 65 2c | 63 6f 6e 73 74 20 63 68 |ilename,|const ch|
|00005a90| 61 72 20 2a 73 29 3b 0d | 76 6f 69 64 20 50 72 69 |ar *s);.|void Pri|
|00005aa0| 6e 74 57 72 61 70 70 65 | 64 43 6f 6d 6d 65 6e 74 |ntWrappe|dComment|
|00005ab0| 28 46 49 4c 45 20 2a 73 | 74 72 65 61 6d 2c 63 6f |(FILE *s|tream,co|
|00005ac0| 6e 73 74 20 63 68 61 72 | 20 2a 73 29 3b 0d 76 6f |nst char| *s);.vo|
|00005ad0| 69 64 20 50 72 69 6e 74 | 57 72 61 70 70 65 64 43 |id Print|WrappedC|
|00005ae0| 6f 6d 6d 65 6e 74 54 6f | 46 69 6c 65 28 63 6f 6e |ommentTo|File(con|
|00005af0| 73 74 20 63 68 61 72 20 | 2a 66 69 6c 65 6e 61 6d |st char |*filenam|
|00005b00| 65 2c 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 73 29 |e,const |char *s)|
|00005b10| 3b 0d 0d 23 69 66 20 4d | 41 43 5f 43 0d 09 2f 2a |;..#if M|AC_C../*|
|00005b20| 20 43 61 72 64 53 6c 6f | 74 2e 63 20 2a 2f 0d 09 | CardSlo|t.c */..|
|00005b30| 0d 09 4f 53 45 72 72 09 | 43 61 72 64 53 6c 6f 74 |..OSErr.|CardSlot|
|00005b40| 28 63 68 61 72 20 2a 63 | 61 72 64 4e 61 6d 65 29 |(char *c|ardName)|
|00005b50| 3b 0d 09 0d 09 2f 2a 20 | 43 65 6e 74 65 72 52 65 |;..../* |CenterRe|
|00005b60| 63 74 49 6e 52 65 63 74 | 2e 63 20 2a 2f 0d 09 0d |ctInRect|.c */...|
|00005b70| 09 76 6f 69 64 09 43 65 | 6e 74 65 72 52 65 63 74 |.void.Ce|nterRect|
|00005b80| 49 6e 52 65 63 74 28 52 | 65 63 74 20 2a 6d 6f 76 |InRect(R|ect *mov|
|00005b90| 65 61 62 6c 65 52 65 63 | 74 50 74 72 2c 52 65 63 |eableRec|tPtr,Rec|
|00005ba0| 74 20 2a 66 69 78 65 64 | 52 65 63 74 50 74 72 29 |t *fixed|RectPtr)|
|00005bb0| 3b 0d 09 76 6f 69 64 09 | 4f 66 66 73 65 74 52 65 |;..void.|OffsetRe|
|00005bc0| 63 74 54 69 6c 65 28 52 | 65 63 74 20 2a 72 2c 69 |ctTile(R|ect *r,i|
|00005bd0| 6e 74 20 6e 78 2c 69 6e | 74 20 6e 79 29 3b 0d 09 |nt nx,in|t ny);..|
|00005be0| 42 6f 6f 6c 65 61 6e 20 | 49 73 52 65 63 74 49 6e |Boolean |IsRectIn|
|00005bf0| 52 65 63 74 28 52 65 63 | 74 20 2a 72 2c 52 65 63 |Rect(Rec|t *r,Rec|
|00005c00| 74 20 2a 52 29 3b 0d 0d | 23 65 6e 64 69 66 0d 0d |t *R);..|#endif..|
|00005c10| 2f 2a 20 43 68 69 53 71 | 75 61 72 65 2e 63 20 2a |/* ChiSq|uare.c *|
|00005c20| 2f 0d 0d 64 6f 75 62 6c | 65 09 50 43 68 69 53 71 |/..doubl|e.PChiSq|
|00005c30| 75 61 72 65 20 28 64 6f | 75 62 6c 65 20 63 68 69 |uare (do|uble chi|
|00005c40| 53 71 75 61 72 65 2c 69 | 6e 74 20 6e 29 3b 0d 0d |Square,i|nt n);..|
|00005c50| 2f 2a 20 43 68 6f 6f 73 | 65 2e 63 20 2a 2f 0d 0d |/* Choos|e.c */..|
|00005c60| 23 69 66 20 21 4d 41 43 | 5f 43 0d 09 23 64 65 66 |#if !MAC|_C..#def|
|00005c70| 69 6e 65 20 42 6f 6f 6c | 65 61 6e 20 75 6e 73 69 |ine Bool|ean unsi|
|00005c80| 67 6e 65 64 20 63 68 61 | 72 0d 23 65 6e 64 69 66 |gned cha|r.#endif|
|00005c90| 0d 69 6e 74 20 43 68 6f | 6f 73 65 28 69 6e 74 20 |.int Cho|ose(int |
|00005ca0| 64 65 66 61 75 6c 74 43 | 68 6f 69 63 65 2c 63 6f |defaultC|hoice,co|
|00005cb0| 6e 73 74 20 63 68 61 72 | 20 2a 71 75 65 72 79 2c |nst char| *query,|
|00005cc0| 63 68 61 72 20 2a 63 68 | 6f 69 63 65 73 5b 5d 2c |char *ch|oices[],|
|00005cd0| 69 6e 74 20 6e 29 3b 0d | 63 68 61 72 20 2a 43 68 |int n);.|char *Ch|
|00005ce0| 6f 69 63 65 53 74 72 28 | 63 68 61 72 20 2a 63 68 |oiceStr(|char *ch|
|00005cf0| 6f 69 63 65 73 5b 5d 2c | 69 6e 74 20 6e 29 3b 0d |oices[],|int n);.|
|00005d00| 69 6e 74 20 4d 75 6c 74 | 69 70 6c 65 43 68 6f 69 |int Mult|ipleChoi|
|00005d10| 63 65 28 73 68 6f 72 74 | 20 64 65 66 61 75 6c 74 |ce(short| default|
|00005d20| 43 68 6f 69 63 65 2c 73 | 68 6f 72 74 20 6e 2c 63 |Choice,s|hort n,c|
|00005d30| 68 61 72 20 2a 63 68 6f | 69 63 65 73 5b 5d 29 3b |har *cho|ices[]);|
|00005d40| 0d 42 6f 6f 6c 65 61 6e | 20 59 65 73 4f 72 4e 6f |.Boolean| YesOrNo|
|00005d50| 28 42 6f 6f 6c 65 61 6e | 20 64 65 66 61 75 6c 74 |(Boolean| default|
|00005d60| 41 6e 73 77 65 72 29 3b | 0d 65 78 74 65 72 6e 20 |Answer);|.extern |
|00005d70| 63 68 61 72 20 2a 6e 6f | 59 65 73 5b 5d 3b 0d 23 |char *no|Yes[];.#|
|00005d80| 69 66 20 21 4d 41 43 5f | 43 0d 09 23 75 6e 64 65 |if !MAC_|C..#unde|
|00005d90| 66 20 42 6f 6f 6c 65 61 | 6e 0d 23 65 6e 64 69 66 |f Boolea|n.#endif|
|00005da0| 0d 0d 23 69 66 20 4d 41 | 43 5f 43 0d 09 2f 2a 20 |..#if MA|C_C../* |
|00005db0| 43 68 6f 6f 73 65 53 63 | 72 65 65 6e 2e 63 20 2a |ChooseSc|reen.c *|
|00005dc0| 2f 0d 09 0d 09 69 6e 74 | 20 43 68 6f 6f 73 65 53 |/....int| ChooseS|
|00005dd0| 63 72 65 65 6e 28 69 6e | 74 20 73 63 72 65 65 6e |creen(in|t screen|
|00005de0| 2c 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 71 75 65 |,const c|har *que|
|00005df0| 73 74 69 6f 6e 29 3b 0d | 0d 09 2f 2a 20 43 6f 6e |stion);.|../* Con|
|00005e00| 76 6f 6c 76 65 58 2e 63 | 20 2a 2f 0d 09 0d 09 76 |volveX.c| */....v|
|00005e10| 6f 69 64 09 43 6f 6e 76 | 6f 6c 76 65 58 28 64 6f |oid.Conv|olveX(do|
|00005e20| 75 62 6c 65 20 66 5b 5d | 2c 69 6e 74 20 64 69 6d |uble f[]|,int dim|
|00005e30| 2c 42 69 74 4d 61 70 20 | 2a 73 72 63 42 69 74 73 |,BitMap |*srcBits|
|00005e40| 2c 42 69 74 4d 61 70 20 | 2a 64 73 74 42 69 74 73 |,BitMap |*dstBits|
|00005e50| 2c 0d 09 09 09 09 52 65 | 63 74 20 2a 73 72 63 52 |,.....Re|ct *srcR|
|00005e60| 65 63 74 50 74 72 2c 52 | 65 63 74 20 2a 64 73 74 |ectPtr,R|ect *dst|
|00005e70| 52 65 63 74 50 74 72 29 | 3b 0d 0d 09 2f 2a 20 43 |RectPtr)|;.../* C|
|00005e80| 6f 6e 76 6f 6c 76 65 59 | 2e 63 20 2a 2f 0d 09 0d |onvolveY|.c */...|
|00005e90| 09 76 6f 69 64 20 43 6f | 6e 76 6f 6c 76 65 59 28 |.void Co|nvolveY(|
|00005ea0| 64 6f 75 62 6c 65 20 66 | 5b 5d 2c 69 6e 74 20 64 |double f|[],int d|
|00005eb0| 69 6d 2c 42 69 74 4d 61 | 70 20 2a 73 72 63 42 69 |im,BitMa|p *srcBi|
|00005ec0| 74 73 2c 42 69 74 4d 61 | 70 20 2a 64 73 74 42 69 |ts,BitMa|p *dstBi|
|00005ed0| 74 73 2c 0d 09 09 09 09 | 52 65 63 74 20 2a 73 72 |ts,.....|Rect *sr|
|00005ee0| 63 52 65 63 74 50 74 72 | 2c 52 65 63 74 20 2a 64 |cRectPtr|,Rect *d|
|00005ef0| 73 74 52 65 63 74 50 74 | 72 29 3b 0d 09 0d 09 2f |stRectPt|r);..../|
|00005f00| 2a 20 43 6f 70 79 42 69 | 74 73 51 75 69 63 6b 6c |* CopyBi|tsQuickl|
|00005f10| 79 2e 63 20 2a 2f 0d 09 | 0d 09 65 6e 75 6d 7b 61 |y.c */..|..enum{a|
|00005f20| 64 64 4f 76 65 72 51 75 | 69 63 6b 6c 79 3d 34 30 |ddOverQu|ickly=40|
|00005f30| 2c 61 64 64 4f 76 65 72 | 50 61 72 61 6c 6c 65 6c |,addOver|Parallel|
|00005f40| 3d 34 30 2c 6d 75 6c 4f | 76 65 72 7d 3b 0d 09 69 |=40,mulO|ver};..i|
|00005f50| 6e 74 09 43 6f 70 79 42 | 69 74 73 51 75 69 63 6b |nt.CopyB|itsQuick|
|00005f60| 6c 79 28 42 69 74 4d 61 | 70 20 2a 73 72 63 42 69 |ly(BitMa|p *srcBi|
|00005f70| 74 73 2c 42 69 74 4d 61 | 70 20 2a 64 73 74 42 69 |ts,BitMa|p *dstBi|
|00005f80| 74 73 0d 09 09 2c 52 65 | 63 74 20 2a 73 72 63 52 |ts...,Re|ct *srcR|
|00005f90| 65 63 74 50 74 72 2c 52 | 65 63 74 20 2a 64 73 74 |ectPtr,R|ect *dst|
|00005fa0| 52 65 63 74 50 74 72 2c | 6c 6f 6e 67 20 73 72 63 |RectPtr,|long src|
|00005fb0| 4d 6f 64 65 2c 52 67 6e | 48 61 6e 64 6c 65 20 6d |Mode,Rgn|Handle m|
|00005fc0| 61 73 6b 52 67 6e 29 3b | 0d 09 0d 09 2f 2a 20 43 |askRgn);|..../* C|
|00005fd0| 6f 70 79 51 75 69 63 6b | 44 72 61 77 47 6c 6f 62 |opyQuick|DrawGlob|
|00005fe0| 61 6c 73 2e 63 20 2a 2f | 0d 09 0d 09 76 6f 69 64 |als.c */|....void|
|00005ff0| 20 43 6f 70 79 51 75 69 | 63 6b 44 72 61 77 47 6c | CopyQui|ckDrawGl|
|00006000| 6f 62 61 6c 73 28 76 6f | 69 64 29 3b 0d 09 23 64 |obals(vo|id);..#d|
|00006010| 65 66 69 6e 65 20 43 6f | 70 79 51 75 69 63 6b 64 |efine Co|pyQuickd|
|00006020| 72 61 77 47 6c 6f 62 61 | 6c 73 20 43 6f 70 79 51 |rawGloba|ls CopyQ|
|00006030| 75 69 63 6b 44 72 61 77 | 47 6c 6f 62 61 6c 73 09 |uickDraw|Globals.|
|00006040| 2f 2a 20 20 6f 6c 64 20 | 73 70 65 6c 6c 69 6e 67 |/* old |spelling|
|00006050| 20 2a 2f 0d 09 0d 09 2f | 2a 20 43 6f 70 79 57 69 | */..../|* CopyWi|
|00006060| 6e 64 6f 77 73 2e 63 20 | 2a 2f 0d 09 0d 09 65 6e |ndows.c |*/....en|
|00006070| 75 6d 7b 63 6f 70 79 4c | 69 74 65 72 61 6c 6c 79 |um{copyL|iterally|
|00006080| 3d 30 78 31 30 30 30 30 | 2c 63 6f 70 79 43 6f 6c |=0x10000|,copyCol|
|00006090| 6f 72 69 7a 65 3d 30 78 | 32 30 30 30 30 7d 3b 0d |orize=0x|20000};.|
|000060a0| 09 65 6e 75 6d 7b 73 72 | 63 43 6f 70 79 4c 69 74 |.enum{sr|cCopyLit|
|000060b0| 65 72 61 6c 6c 79 3d 73 | 72 63 43 6f 70 79 2b 63 |erally=s|rcCopy+c|
|000060c0| 6f 70 79 4c 69 74 65 72 | 61 6c 6c 79 2c 61 64 64 |opyLiter|ally,add|
|000060d0| 4f 76 65 72 4c 69 74 65 | 72 61 6c 6c 79 3d 61 64 |OverLite|rally=ad|
|000060e0| 64 4f 76 65 72 2b 63 6f | 70 79 4c 69 74 65 72 61 |dOver+co|pyLitera|
|000060f0| 6c 6c 79 0d 09 09 2c 61 | 64 64 4f 76 65 72 50 61 |lly...,a|ddOverPa|
|00006100| 72 61 6c 6c 65 6c 4c 69 | 74 65 72 61 6c 6c 79 3d |rallelLi|terally=|
|00006110| 61 64 64 4f 76 65 72 50 | 61 72 61 6c 6c 65 6c 2b |addOverP|arallel+|
|00006120| 63 6f 70 79 4c 69 74 65 | 72 61 6c 6c 79 0d 09 09 |copyLite|rally...|
|00006130| 2c 6d 75 6c 4f 76 65 72 | 4c 69 74 65 72 61 6c 6c |,mulOver|Literall|
|00006140| 79 3d 6d 75 6c 4f 76 65 | 72 2b 63 6f 70 79 4c 69 |y=mulOve|r+copyLi|
|00006150| 74 65 72 61 6c 6c 79 7d | 3b 0d 09 69 6e 74 20 43 |terally}|;..int C|
|00006160| 6f 70 79 57 69 6e 64 6f | 77 73 28 43 57 69 6e 64 |opyWindo|ws(CWind|
|00006170| 6f 77 50 74 72 20 73 72 | 63 57 69 6e 64 6f 77 2c |owPtr sr|cWindow,|
|00006180| 43 57 69 6e 64 6f 77 50 | 74 72 20 64 73 74 57 69 |CWindowP|tr dstWi|
|00006190| 6e 64 6f 77 0d 09 09 2c | 52 65 63 74 20 2a 73 72 |ndow...,|Rect *sr|
|000061a0| 63 52 65 63 74 50 74 72 | 2c 52 65 63 74 20 2a 64 |cRectPtr|,Rect *d|
|000061b0| 73 74 52 65 63 74 50 74 | 72 2c 6c 6f 6e 67 20 73 |stRectPt|r,long s|
|000061c0| 72 63 4d 6f 64 65 2c 52 | 67 6e 48 61 6e 64 6c 65 |rcMode,R|gnHandle|
|000061d0| 20 6d 61 73 6b 52 67 6e | 29 3b 0d 0d 09 2f 2a 20 | maskRgn|);.../* |
|000061e0| 43 72 65 61 74 65 54 72 | 69 61 6c 53 6e 64 73 2e |CreateTr|ialSnds.|
|000061f0| 63 20 2a 2f 0d 09 0d 09 | 76 6f 69 64 20 43 72 65 |c */....|void Cre|
|00006200| 61 74 65 54 72 69 61 6c | 53 6e 64 73 28 76 6f 69 |ateTrial|Snds(voi|
|00006210| 64 29 3b 0d 23 65 6e 64 | 69 66 0d 0d 2f 2a 20 44 |d);.#end|if../* D|
|00006220| 61 74 65 64 53 74 72 69 | 6e 67 2e 63 20 2a 2f 0d |atedStri|ng.c */.|
|00006230| 0d 63 68 61 72 09 2a 44 | 61 74 65 64 53 74 72 69 |.char.*D|atedStri|
|00006240| 6e 67 28 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |ng(unsig|ned long|
|00006250| 20 73 65 63 6f 6e 64 73 | 29 3b 0d 0d 23 69 66 20 | seconds|);..#if |
|00006260| 4d 41 43 5f 43 0d 09 2f | 2a 20 44 72 61 77 50 72 |MAC_C../|* DrawPr|
|00006270| 69 6e 74 66 2e 63 20 2a | 2f 0d 09 0d 09 76 6f 69 |intf.c *|/....voi|
|00006280| 64 20 44 72 61 77 50 72 | 69 6e 74 66 28 63 68 61 |d DrawPr|intf(cha|
|00006290| 72 20 2a 73 2c 20 2e 2e | 2e 29 3b 0d 23 65 6e 64 |r *s, ..|.);.#end|
|000062a0| 69 66 0d 0d 2f 2a 20 45 | 78 70 6f 6e 65 6e 74 69 |if../* E|xponenti|
|000062b0| 61 6c 2e 63 20 2a 2f 0d | 0d 64 6f 75 62 6c 65 20 |al.c */.|.double |
|000062c0| 45 78 70 6f 6e 65 6e 74 | 69 61 6c 50 64 66 28 64 |Exponent|ialPdf(d|
|000062d0| 6f 75 62 6c 65 20 78 29 | 3b 0d 0d 2f 2a 20 66 66 |ouble x)|;../* ff|
|000062e0| 70 72 69 6e 74 66 2e 63 | 20 2a 2f 0d 0d 69 6e 74 |printf.c| */..int|
|000062f0| 20 66 66 70 72 69 6e 74 | 66 28 46 49 4c 45 20 2a | ffprint|f(FILE *|
|00006300| 73 74 72 65 61 6d 5b 32 | 5d 2c 63 68 61 72 20 2a |stream[2|],char *|
|00006310| 66 6f 72 6d 61 74 2c 2e | 2e 2e 29 3b 0d 0d 23 69 |format,.|..);..#i|
|00006320| 66 20 4d 41 43 5f 43 0d | 09 2f 2a 20 46 6c 75 73 |f MAC_C.|./* Flus|
|00006330| 68 43 61 63 68 65 52 61 | 6e 67 65 2e 63 20 2a 2f |hCacheRa|nge.c */|
|00006340| 0d 09 0d 09 76 6f 69 64 | 20 46 6c 75 73 68 43 61 |....void| FlushCa|
|00006350| 63 68 65 52 61 6e 67 65 | 20 28 76 6f 69 64 20 2a |cheRange| (void *|
|00006360| 61 64 64 72 65 73 73 2c | 20 75 6e 73 69 67 6e 65 |address,| unsigne|
|00006370| 64 20 6c 6f 6e 67 20 63 | 6f 75 6e 74 29 3b 0d 09 |d long c|ount);..|
|00006380| 0d 09 2f 2a 20 66 70 2e | 63 20 2a 2f 0d 09 0d 09 |../* fp.|c */....|
|00006390| 2f 2a 20 54 68 65 73 65 | 20 33 20 70 72 6f 74 6f |/* These| 3 proto|
|000063a0| 74 79 70 65 73 20 61 70 | 70 65 61 72 20 69 6e 20 |types ap|pear in |
|000063b0| 41 70 70 6c 65 27 73 20 | 66 70 2e 68 2c 20 62 75 |Apple's |fp.h, bu|
|000063c0| 74 20 6f 6e 6c 79 20 77 | 68 65 6e 20 69 74 27 73 |t only w|hen it's|
|000063d0| 20 63 6f 6d 70 69 6c 65 | 64 20 66 6f 72 20 2a 2f | compile|d for */|
|000063e0| 0d 09 2f 2a 20 74 68 65 | 20 50 6f 77 65 72 50 43 |../* the| PowerPC|
|000063f0| 2c 20 6e 6f 74 20 66 6f | 72 20 74 68 65 20 36 38 |, not fo|r the 68|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.